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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <windows.h> | 9 #include <windows.h> |
10 | 10 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 // Add a DeleteRegKeyWorkItem that deletes a registry key from the given | 55 // Add a DeleteRegKeyWorkItem that deletes a registry key from the given |
56 // path. | 56 // path. |
57 WorkItem* AddDeleteRegKeyWorkItem(HKEY predefined_root, | 57 WorkItem* AddDeleteRegKeyWorkItem(HKEY predefined_root, |
58 const std::wstring& path); | 58 const std::wstring& path); |
59 | 59 |
60 // Add a DeleteRegValueWorkItem that deletes registry value of type REG_SZ | 60 // Add a DeleteRegValueWorkItem that deletes registry value of type REG_SZ |
61 // or REG_DWORD. | 61 // or REG_DWORD. |
62 WorkItem* AddDeleteRegValueWorkItem(HKEY predefined_root, | 62 WorkItem* AddDeleteRegValueWorkItem(HKEY predefined_root, |
63 const std::wstring& key_path, | 63 const std::wstring& key_path, |
64 const std::wstring& value_name, | 64 const std::wstring& value_name); |
65 DWORD type); | |
66 | 65 |
67 // Add a DeleteTreeWorkItem that recursively deletes a file system | 66 // Add a DeleteTreeWorkItem that recursively deletes a file system |
68 // hierarchy at the given root path. A key file can be optionally specified | 67 // hierarchy at the given root path. A key file can be optionally specified |
69 // by key_path. | 68 // by key_path. |
70 WorkItem* AddDeleteTreeWorkItem(const FilePath& root_path, | 69 WorkItem* AddDeleteTreeWorkItem(const FilePath& root_path, |
71 const std::vector<FilePath>& key_paths); | 70 const std::vector<FilePath>& key_paths); |
72 | 71 |
73 // Same as above but without support for key files. | 72 // Same as above but without support for key files. |
74 WorkItem* AddDeleteTreeWorkItem(const FilePath& root_path); | 73 WorkItem* AddDeleteTreeWorkItem(const FilePath& root_path); |
75 | 74 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 // Execute the WorkItems in the same order as they are added to the list. | 146 // Execute the WorkItems in the same order as they are added to the list. |
148 // If a WorkItem fails, the function will return failure but all other | 147 // If a WorkItem fails, the function will return failure but all other |
149 // WorkItems will still be executed. | 148 // WorkItems will still be executed. |
150 virtual bool Do(); | 149 virtual bool Do(); |
151 | 150 |
152 // Just does a NOTREACHED. | 151 // Just does a NOTREACHED. |
153 virtual void Rollback(); | 152 virtual void Rollback(); |
154 }; | 153 }; |
155 | 154 |
156 #endif // CHROME_INSTALLER_UTIL_WORK_ITEM_LIST_H_ | 155 #endif // CHROME_INSTALLER_UTIL_WORK_ITEM_LIST_H_ |
OLD | NEW |