Change ScopedTempDir::path() to GetPath() in chrome/browser/chromeos/file_manager

This CL also changes TestVolume::CreateRootDirectory to handle that GetPath()
(unlike path()) cannot be called before initialising the ScopedTempDir. Because
CreateRootDirectory apparently can be called multiple times from
FakeTestVolume, it needs to handle that and not initialise the directory twice.
On the other hand, the directory cannot be initialised from anywhere else, so
this CL made this clear by adding a Boolean member root_initialized_ which is
updated and checked by CreateRootDirectory. Using the Boolean member, unlike
just handling the fact that the directory has been already initialised (this
information is still possible to retrieve via Take()+Set()), makes it clearer
that the assumption is the directory only being initialised where also
root_initialized_ is set.

R=achuith@chromium.org
BUG=640599

Review-Url: https://codereview.chromium.org/2345473002
Cr-Commit-Position: refs/heads/master@{#418797}
4 files changed