Index: chrome/installer/util/work_item_list.cc |
diff --git a/chrome/installer/util/work_item_list.cc b/chrome/installer/util/work_item_list.cc |
index 609933065afaa65ac768c1c48a34d0820e2b79ef..8dda5232dccac2651146121f87f5a1c49b455e66 100644 |
--- a/chrome/installer/util/work_item_list.cc |
+++ b/chrome/installer/util/work_item_list.cc |
@@ -32,9 +32,8 @@ WorkItemList::WorkItemList() |
: status_(ADD_ITEM) { |
} |
-bool WorkItemList::Do() { |
- if (status_ != ADD_ITEM) |
- return false; |
+bool WorkItemList::DoImpl() { |
+ DCHECK_EQ(ADD_ITEM, status_); |
bool result = true; |
while (!list_.empty()) { |
@@ -55,7 +54,7 @@ bool WorkItemList::Do() { |
return result; |
} |
-void WorkItemList::Rollback() { |
+void WorkItemList::RollbackImpl() { |
if (status_ != LIST_EXECUTED) |
return; |
@@ -236,16 +235,15 @@ WorkItem* WorkItemList::AddSelfRegWorkItem(const std::wstring& dll_path, |
NoRollbackWorkItemList::~NoRollbackWorkItemList() { |
} |
-bool NoRollbackWorkItemList::Do() { |
- if (status_ != ADD_ITEM) |
- return false; |
+bool NoRollbackWorkItemList::DoImpl() { |
grt (UTC plus 2)
2016/04/27 17:29:17
do we need this class? can WIL::DoImpl check its o
fdoray
2016/05/02 20:10:00
Applying the WIL's allow_rollback/best_effort flag
grt (UTC plus 2)
2016/05/06 18:39:13
No. It'd be nice to have something like:
VLOG(1
|
+ DCHECK_EQ(ADD_ITEM, status_); |
bool result = true; |
while (!list_.empty()) { |
WorkItem* work_item = list_.front(); |
list_.pop_front(); |
executed_list_.push_front(work_item); |
- work_item->set_ignore_failure(true); |
+ work_item->set_allow_rollback(false); |
if (!work_item->Do()) { |
LOG(ERROR) << "NoRollbackWorkItemList: item execution failed " |
<< work_item->log_message(); |
@@ -260,6 +258,6 @@ bool NoRollbackWorkItemList::Do() { |
return result; |
} |
-void NoRollbackWorkItemList::Rollback() { |
+void NoRollbackWorkItemList::RollbackImpl() { |
// Ignore rollback. |
} |