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

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

Issue 2379543002: installer and some misc files: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Fix compilation failure 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.cc
diff --git a/chrome/installer/util/delete_tree_work_item.cc b/chrome/installer/util/delete_tree_work_item.cc
index 8fc5dadfed220c7193bab53f9d177c6374c96d90..1530a8bd499fd97ffa418245f35da71b62119922 100644
--- a/chrome/installer/util/delete_tree_work_item.cc
+++ b/chrome/installer/util/delete_tree_work_item.cc
@@ -39,14 +39,17 @@ void DeleteTreeWorkItem::RollbackImpl() {
}
base::FilePath DeleteTreeWorkItem::GetBackupPath() {
- if (backup_path_.path().empty() &&
- !backup_path_.CreateUniqueTempDirUnderPath(temp_path_)) {
- PLOG(ERROR) << "Failed to get backup path in folder " << temp_path_.value();
- return base::FilePath();
+ if (backup_path_.empty()) {
+ if (!backup_dir_.CreateUniqueTempDirUnderPath(temp_path_)) {
+ PLOG(ERROR) << "Failed to get backup path in folder "
+ << temp_path_.value();
+ return base::FilePath();
+ }
+ backup_path_ = backup_dir_.GetPath();
gab 2016/09/28 16:31:59 If we're going to have a local copy of this variab
vabr (Chromium) 2016/09/29 09:11:03 Done.
}
- DCHECK(!backup_path_.path().empty());
- return backup_path_.path().Append(root_path_.BaseName());
+ DCHECK(!backup_path_.empty());
+ return backup_path_.Append(root_path_.BaseName());
}
bool DeleteTreeWorkItem::DeleteRoot() {

Powered by Google App Engine
This is Rietveld 408576698