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

Side by Side Diff: chrome/installer/util/work_item_list.cc

Issue 6538025: Temp dir cleanup:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/installer/util/work_item_list.h" 5 #include "chrome/installer/util/work_item_list.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "chrome/installer/util/logging_installer.h" 9 #include "chrome/installer/util/logging_installer.h"
10 #include "chrome/installer/util/copy_tree_work_item.h" 10 #include "chrome/installer/util/copy_tree_work_item.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 const std::wstring& key_path, 112 const std::wstring& key_path,
113 const std::wstring& value_name) { 113 const std::wstring& value_name) {
114 WorkItem* item = WorkItem::CreateDeleteRegValueWorkItem(predefined_root, 114 WorkItem* item = WorkItem::CreateDeleteRegValueWorkItem(predefined_root,
115 key_path, value_name); 115 key_path, value_name);
116 AddWorkItem(item); 116 AddWorkItem(item);
117 return item; 117 return item;
118 } 118 }
119 119
120 WorkItem* WorkItemList::AddDeleteTreeWorkItem( 120 WorkItem* WorkItemList::AddDeleteTreeWorkItem(
121 const FilePath& root_path, 121 const FilePath& root_path,
122 const FilePath& temp_path,
122 const std::vector<FilePath>& key_paths) { 123 const std::vector<FilePath>& key_paths) {
123 WorkItem* item = WorkItem::CreateDeleteTreeWorkItem(root_path, key_paths); 124 WorkItem* item = WorkItem::CreateDeleteTreeWorkItem(root_path, temp_path,
125 key_paths);
124 AddWorkItem(item); 126 AddWorkItem(item);
125 return item; 127 return item;
126 } 128 }
127 129
128 WorkItem* WorkItemList::AddDeleteTreeWorkItem(const FilePath& root_path) { 130 WorkItem* WorkItemList::AddDeleteTreeWorkItem(const FilePath& root_path,
131 const FilePath& temp_path) {
129 std::vector<FilePath> no_key_files; 132 std::vector<FilePath> no_key_files;
130 return AddDeleteTreeWorkItem(root_path, no_key_files); 133 return AddDeleteTreeWorkItem(root_path, temp_path, no_key_files);
131 } 134 }
132 135
133 WorkItem* WorkItemList::AddMoveTreeWorkItem(const std::wstring& source_path, 136 WorkItem* WorkItemList::AddMoveTreeWorkItem(const std::wstring& source_path,
134 const std::wstring& dest_path, 137 const std::wstring& dest_path,
135 const std::wstring& temp_dir) { 138 const std::wstring& temp_dir) {
136 WorkItem* item = WorkItem::CreateMoveTreeWorkItem(FilePath(source_path), 139 WorkItem* item = WorkItem::CreateMoveTreeWorkItem(FilePath(source_path),
137 FilePath(dest_path), 140 FilePath(dest_path),
138 FilePath(temp_dir)); 141 FilePath(temp_dir));
139 AddWorkItem(item); 142 AddWorkItem(item);
140 return item; 143 return item;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 VLOG(1) << "NoRollbackWorkItemList: list execution succeeded"; 217 VLOG(1) << "NoRollbackWorkItemList: list execution succeeded";
215 218
216 status_ = LIST_EXECUTED; 219 status_ = LIST_EXECUTED;
217 return result; 220 return result;
218 } 221 }
219 222
220 void NoRollbackWorkItemList::Rollback() { 223 void NoRollbackWorkItemList::Rollback() {
221 NOTREACHED() << "Can't rollback a NoRollbackWorkItemList"; 224 NOTREACHED() << "Can't rollback a NoRollbackWorkItemList";
222 } 225 }
223 226
OLDNEW
« chrome/installer/util/delete_tree_work_item.cc ('K') | « chrome/installer/util/work_item_list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698