Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4471)

Unified Diff: chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc

Issue 2345473002: Change ScopedTempDir::path() to GetPath() in chrome/browser/chromeos/file_manager (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/file_manager/file_watcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc
diff --git a/chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc b/chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc
index 9da84ffcab971562f728457f58caa4ec1c4c5894..21f8af2d25053523cda6bc0a4945da4d64bee454 100644
--- a/chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc
+++ b/chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc
@@ -184,16 +184,20 @@ class TestVolume {
virtual ~TestVolume() {}
bool CreateRootDirectory(const Profile* profile) {
- const base::FilePath path = profile->GetPath().Append(name_);
- return root_.path() == path || root_.Set(path);
+ if (root_initialized_)
+ return true;
+
+ root_initialized_ = root_.Set(profile->GetPath().Append(name_));
+ return root_initialized_;
}
- const std::string& name() { return name_; }
- const base::FilePath root_path() { return root_.path(); }
+ const std::string& name() const { return name_; }
+ const base::FilePath& root_path() const { return root_.GetPath(); }
private:
std::string name_;
base::ScopedTempDir root_;
+ bool root_initialized_ = false;
};
// Listener to obtain the test relative messages synchronously.
« no previous file with comments | « no previous file | chrome/browser/chromeos/file_manager/file_watcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698