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

Unified Diff: chrome/installer/util/set_reg_value_work_item.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, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/installer/util/set_reg_value_work_item.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/set_reg_value_work_item.h
diff --git a/chrome/installer/util/set_reg_value_work_item.h b/chrome/installer/util/set_reg_value_work_item.h
index 0c4d0c838d1bed203c657877518dd9fedd91a649..6ccb3773439e771ce7aa067a624d76dacff11521 100644
--- a/chrome/installer/util/set_reg_value_work_item.h
+++ b/chrome/installer/util/set_reg_value_work_item.h
@@ -10,6 +10,7 @@
#include <string>
#include <vector>
+#include "base/callback.h"
#include "chrome/installer/util/work_item.h"
// A WorkItem subclass that sets a registry value with REG_SZ, REG_DWORD, or
@@ -63,6 +64,13 @@ class SetRegValueWorkItem : public WorkItem {
int64 value_data,
bool overwrite);
+ // Implies |overwrite_| and TYPE_SZ for now.
+ SetRegValueWorkItem(HKEY predefined_root,
+ const std::wstring& key_path,
+ REGSAM wow64_access,
+ const std::wstring& value_name,
+ const GetValueFromExistingCallback& get_value_callback);
+
// Root key of the target key under which the value is set. The root key can
// only be one of the predefined keys on Windows.
HKEY predefined_root_;
@@ -73,6 +81,10 @@ class SetRegValueWorkItem : public WorkItem {
// Name of the value to be set.
std::wstring value_name_;
+ // If this is set, it will be used to get the desired value to be set based on
+ // the existing value in the registry.
+ const GetValueFromExistingCallback get_value_callback_;
+
// Whether to overwrite the existing value under the target key.
bool overwrite_;
« no previous file with comments | « no previous file | chrome/installer/util/set_reg_value_work_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698