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

Unified Diff: chrome/installer/util/delete_tree_work_item.h

Issue 2379543002: installer and some misc files: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: regroup ifs 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
Index: chrome/installer/util/delete_tree_work_item.h
diff --git a/chrome/installer/util/delete_tree_work_item.h b/chrome/installer/util/delete_tree_work_item.h
index 9a144e8976cae89491ce40a08474c143598675c4..9bf453e3e9003b19de998cbda0c34ea2e1014513 100644
--- a/chrome/installer/util/delete_tree_work_item.h
+++ b/chrome/installer/util/delete_tree_work_item.h
@@ -33,7 +33,7 @@ class DeleteTreeWorkItem : public WorkItem {
void RollbackImpl() override;
// Return temporary path for work based on |backup_path_| and |root_path_|.
- base::FilePath GetBackupPath();
+ const base::FilePath& GetBackupPath();
// Attempts to delete |root_path_|. Returns true on success.
bool DeleteRoot();
@@ -48,7 +48,11 @@ class DeleteTreeWorkItem : public WorkItem {
const base::FilePath temp_path_;
// The temporary directory into which the original root_path_ has been moved.
- base::ScopedTempDir backup_path_;
+ base::ScopedTempDir backup_dir_;
+
+ // Caches the return value of GetBackupPath(). This is empty if |backup_dir_|
+ // has not been created.
+ base::FilePath backup_path_;
// Set to true once root_path_ has been moved into backup_path_.
bool moved_to_backup_ = false;
« no previous file with comments | « chrome/installer/util/copy_tree_work_item_unittest.cc ('k') | chrome/installer/util/delete_tree_work_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698