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

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

Issue 1882923003: Add best-effort/allow rollback flags on WorkItem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simple_list_tests
Patch Set: Created 4 years, 8 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/work_item_list.h
diff --git a/chrome/installer/util/work_item_list.h b/chrome/installer/util/work_item_list.h
index 62351b88e70efb7dd0732ac04f0d08c7d9edf8c8..fe82895a39137324a99f8199e699cd63926925a6 100644
--- a/chrome/installer/util/work_item_list.h
+++ b/chrome/installer/util/work_item_list.h
@@ -28,13 +28,6 @@ class WorkItemList : public WorkItem {
public:
~WorkItemList() override;
- // Execute the WorkItems in the same order as they are added to the list.
- // It aborts as soon as one WorkItem fails.
- bool Do() override;
-
- // Rollback the WorkItems in the reverse order as they are executed.
- void Rollback() override;
-
// Add a WorkItem to the list.
// A WorkItem can only be added to the list before the list's DO() is called.
// Once a WorkItem is added to the list. The list owns the WorkItem.
@@ -155,6 +148,15 @@ class WorkItemList : public WorkItem {
WorkItemList();
+ // WorkItem:
+
+ // Execute the WorkItems in the same order as they are added to the list.
+ // It aborts as soon as one WorkItem fails.
+ bool DoImpl() override;
+
+ // Rollback the WorkItems in the reverse order as they are executed.
+ void RollbackImpl() override;
+
ListStatus status_;
// The list of WorkItems, in the order of them being added.
@@ -173,13 +175,16 @@ class NoRollbackWorkItemList : public WorkItemList {
public:
~NoRollbackWorkItemList() override;
+ private:
+ // WorkItemList:
+
// Execute the WorkItems in the same order as they are added to the list.
// If a WorkItem fails, the function will return failure but all other
// WorkItems will still be executed.
- bool Do() override;
+ bool DoImpl() override;
// No-op.
- void Rollback() override;
+ void RollbackImpl() override;
};
#endif // CHROME_INSTALLER_UTIL_WORK_ITEM_LIST_H_

Powered by Google App Engine
This is Rietveld 408576698