OLD | NEW |
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 #ifndef CHROME_INSTALLER_UTIL_WORK_ITEM_LIST_H_ | 5 #ifndef CHROME_INSTALLER_UTIL_WORK_ITEM_LIST_H_ |
6 #define CHROME_INSTALLER_UTIL_WORK_ITEM_LIST_H_ | 6 #define CHROME_INSTALLER_UTIL_WORK_ITEM_LIST_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <list> | 11 #include <list> |
| 12 #include <memory> |
12 #include <string> | 13 #include <string> |
13 #include <vector> | 14 #include <vector> |
14 | 15 |
15 #include "base/callback_forward.h" | 16 #include "base/callback_forward.h" |
16 #include "base/memory/scoped_ptr.h" | |
17 #include "chrome/installer/util/work_item.h" | 17 #include "chrome/installer/util/work_item.h" |
18 | 18 |
19 namespace base { | 19 namespace base { |
20 class FilePath; | 20 class FilePath; |
21 } | 21 } |
22 | 22 |
23 // A WorkItem subclass that recursively contains a list of WorkItems. Thus it | 23 // A WorkItem subclass that recursively contains a list of WorkItems. Thus it |
24 // provides functionalities to carry out or roll back the sequence of actions | 24 // provides functionalities to carry out or roll back the sequence of actions |
25 // defined by the list of WorkItems it contains. | 25 // defined by the list of WorkItems it contains. |
26 // The WorkItems are executed in the same order as they are added to the list. | 26 // The WorkItems are executed in the same order as they are added to the list. |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 // Execute the WorkItems in the same order as they are added to the list. | 176 // Execute the WorkItems in the same order as they are added to the list. |
177 // If a WorkItem fails, the function will return failure but all other | 177 // If a WorkItem fails, the function will return failure but all other |
178 // WorkItems will still be executed. | 178 // WorkItems will still be executed. |
179 bool Do() override; | 179 bool Do() override; |
180 | 180 |
181 // No-op. | 181 // No-op. |
182 void Rollback() override; | 182 void Rollback() override; |
183 }; | 183 }; |
184 | 184 |
185 #endif // CHROME_INSTALLER_UTIL_WORK_ITEM_LIST_H_ | 185 #endif // CHROME_INSTALLER_UTIL_WORK_ITEM_LIST_H_ |
OLD | NEW |