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

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

Issue 1220473002: Introduce a SetRegValueWorkItem overload that accepts a callback instead (...) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review:grt 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
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 #include "chrome/installer/util/work_item_list.h" 5 #include "chrome/installer/util/work_item_list.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/installer/util/callback_work_item.h" 9 #include "chrome/installer/util/callback_work_item.h"
10 #include "chrome/installer/util/copy_tree_work_item.h" 10 #include "chrome/installer/util/copy_tree_work_item.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 WorkItem::CreateSetRegValueWorkItem(predefined_root, 201 WorkItem::CreateSetRegValueWorkItem(predefined_root,
202 key_path, 202 key_path,
203 wow64_access, 203 wow64_access,
204 value_name, 204 value_name,
205 value_data, 205 value_data,
206 overwrite)); 206 overwrite));
207 AddWorkItem(item); 207 AddWorkItem(item);
208 return item; 208 return item;
209 } 209 }
210 210
211 WorkItem* WorkItemList::AddSetRegValueWorkItem(
212 HKEY predefined_root,
213 const std::wstring& key_path,
214 REGSAM wow64_access,
215 const std::wstring& value_name,
216 const WorkItem::GetValueFromExistingCallback& get_value_callback) {
217 WorkItem* item = WorkItem::CreateSetRegValueWorkItem(predefined_root,
218 key_path,
219 wow64_access,
220 value_name,
221 get_value_callback);
222 AddWorkItem(item);
223 return item;
224 }
225
211 WorkItem* WorkItemList::AddSelfRegWorkItem(const std::wstring& dll_path, 226 WorkItem* WorkItemList::AddSelfRegWorkItem(const std::wstring& dll_path,
212 bool do_register, 227 bool do_register,
213 bool user_level_registration) { 228 bool user_level_registration) {
214 WorkItem* item = WorkItem::CreateSelfRegWorkItem(dll_path, do_register, 229 WorkItem* item = WorkItem::CreateSelfRegWorkItem(dll_path, do_register,
215 user_level_registration); 230 user_level_registration);
216 AddWorkItem(item); 231 AddWorkItem(item);
217 return item; 232 return item;
218 } 233 }
219 234
220 //////////////////////////////////////////////////////////////////////////////// 235 ////////////////////////////////////////////////////////////////////////////////
(...skipping 20 matching lines...) Expand all
241 if (result) 256 if (result)
242 VLOG(1) << "NoRollbackWorkItemList: list execution succeeded"; 257 VLOG(1) << "NoRollbackWorkItemList: list execution succeeded";
243 258
244 status_ = LIST_EXECUTED; 259 status_ = LIST_EXECUTED;
245 return result; 260 return result;
246 } 261 }
247 262
248 void NoRollbackWorkItemList::Rollback() { 263 void NoRollbackWorkItemList::Rollback() {
249 // Ignore rollback. 264 // Ignore rollback.
250 } 265 }
OLDNEW
« chrome/installer/util/set_reg_value_work_item.cc ('K') | « chrome/installer/util/work_item_list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698