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

Side by Side Diff: chrome/installer/util/work_item_list.h

Issue 1220473002: Introduce a SetRegValueWorkItem overload that accepts a callback instead (...) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adopt grt's suggestion Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « chrome/installer/util/work_item.cc ('k') | chrome/installer/util/work_item_list.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « chrome/installer/util/work_item.cc ('k') | chrome/installer/util/work_item_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698