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

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

Issue 6598065: Add rollback support to DeleteRegKeyWorkItem.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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
« no previous file with comments | « chrome/installer/util/delete_reg_key_work_item_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 if (status_ != ADD_ITEM) 201 if (status_ != ADD_ITEM)
202 return false; 202 return false;
203 203
204 bool result = true; 204 bool result = true;
205 while (!list_.empty()) { 205 while (!list_.empty()) {
206 WorkItem* work_item = list_.front(); 206 WorkItem* work_item = list_.front();
207 list_.pop_front(); 207 list_.pop_front();
208 executed_list_.push_front(work_item); 208 executed_list_.push_front(work_item);
209 work_item->set_ignore_failure(true); 209 work_item->set_ignore_failure(true);
210 if (!work_item->Do()) { 210 if (!work_item->Do()) {
211 LOG(ERROR) << "NoRollbackWorkItemList: item execution failed."; 211 LOG(ERROR) << "NoRollbackWorkItemList: item execution failed "
212 << work_item->log_message();
212 result = false; 213 result = false;
213 } 214 }
214 } 215 }
215 216
216 if (result) 217 if (result)
217 VLOG(1) << "NoRollbackWorkItemList: list execution succeeded"; 218 VLOG(1) << "NoRollbackWorkItemList: list execution succeeded";
218 219
219 status_ = LIST_EXECUTED; 220 status_ = LIST_EXECUTED;
220 return result; 221 return result;
221 } 222 }
222 223
223 void NoRollbackWorkItemList::Rollback() { 224 void NoRollbackWorkItemList::Rollback() {
224 NOTREACHED() << "Can't rollback a NoRollbackWorkItemList"; 225 NOTREACHED() << "Can't rollback a NoRollbackWorkItemList";
225 } 226 }
226
OLDNEW
« no previous file with comments | « chrome/installer/util/delete_reg_key_work_item_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698