Skip to content
  • vabr's avatar
    c/browser, c/common, components M-N: Change ScopedTempDir::path() to GetPath() · 6c5aae89
    vabr authored
    path() is being deprecated, GetPath() has better checking against wrong use.
    
    For more context, see https://codereview.chromium.org/2275553005/.
    
    This CL does two non-trivial changes in addition to the mechanical renaming and reformatting:
    * In components/nacl/browser/pnacl_translation_cache_unittest.cc, and
    * in chrome/browser/media_galleries/fileapi/itunes_data_provider_browsertest.cc
    the CL modifies the test code to keep track whether the ScopedTempDir was initialised and can vend the path, or whether it was not, and cannot be asked for the path. In both cases, before this CL, ScopedTempDir needed to trust the test code to not to store any files under the uninitialised path. After the CL, ScopedTempDir can assume that whenever it vends the path, files may be written under it, and the contract of not touching the uninitialised path stays limited to the test and the tested code.
    
    BUG=640599
    R=mseaborn@chromium.org, reillyg@chromium.org
    TBR=rsesek@chromium.org, blundell@chromium.org, sergeyu@chromium.org
    
    Review-Url: https://codereview.chromium.org/2318033002
    Cr-Commit-Position: refs/heads/master@{#418798}
    6c5aae89