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 | 9 |
10 #include <list> | 10 #include <list> |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 113 |
114 // Add a SetRegValueWorkItem that sets a registry value with REG_QWORD type | 114 // Add a SetRegValueWorkItem that sets a registry value with REG_QWORD type |
115 // at the key with specified path. | 115 // at the key with specified path. |
116 virtual WorkItem* AddSetRegValueWorkItem(HKEY predefined_root, | 116 virtual WorkItem* AddSetRegValueWorkItem(HKEY predefined_root, |
117 const std::wstring& key_path, | 117 const std::wstring& key_path, |
118 REGSAM wow64_access, | 118 REGSAM wow64_access, |
119 const std::wstring& value_name, | 119 const std::wstring& value_name, |
120 int64 value_data, | 120 int64 value_data, |
121 bool overwrite); | 121 bool overwrite); |
122 | 122 |
| 123 // Add a SetRegValueWorkItem that sets a registry value based on the value |
| 124 // provided by |get_value_callback| given the existing value under |
| 125 // |key_path\value_name|. |
| 126 virtual WorkItem* AddSetRegValueWorkItem( |
| 127 HKEY predefined_root, |
| 128 const std::wstring& key_path, |
| 129 REGSAM wow64_access, |
| 130 const std::wstring& value_name, |
| 131 const WorkItem::GetValueFromExistingCallback& get_value_callback); |
| 132 |
123 // Add a SelfRegWorkItem that registers or unregisters a DLL at the | 133 // Add a SelfRegWorkItem that registers or unregisters a DLL at the |
124 // specified path. If user_level_registration is true, then alternate | 134 // specified path. If user_level_registration is true, then alternate |
125 // registration and unregistration entry point names will be used. | 135 // registration and unregistration entry point names will be used. |
126 virtual WorkItem* AddSelfRegWorkItem(const std::wstring& dll_path, | 136 virtual WorkItem* AddSelfRegWorkItem(const std::wstring& dll_path, |
127 bool do_register, | 137 bool do_register, |
128 bool user_level_registration); | 138 bool user_level_registration); |
129 | 139 |
130 protected: | 140 protected: |
131 friend class WorkItem; | 141 friend class WorkItem; |
132 | 142 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 // Execute the WorkItems in the same order as they are added to the list. | 175 // Execute the WorkItems in the same order as they are added to the list. |
166 // If a WorkItem fails, the function will return failure but all other | 176 // If a WorkItem fails, the function will return failure but all other |
167 // WorkItems will still be executed. | 177 // WorkItems will still be executed. |
168 bool Do() override; | 178 bool Do() override; |
169 | 179 |
170 // No-op. | 180 // No-op. |
171 void Rollback() override; | 181 void Rollback() override; |
172 }; | 182 }; |
173 | 183 |
174 #endif // CHROME_INSTALLER_UTIL_WORK_ITEM_LIST_H_ | 184 #endif // CHROME_INSTALLER_UTIL_WORK_ITEM_LIST_H_ |
OLD | NEW |