Chromium Code Reviews| Index: chrome/installer/util/shell_util.cc |
| diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc |
| index 9e705cce2f70c808caed8aa1ab39e7c08c42f621..0969b87e6e1daac96393a2be248627a4490086b0 100644 |
| --- a/chrome/installer/util/shell_util.cc |
| +++ b/chrome/installer/util/shell_util.cc |
| @@ -48,6 +48,7 @@ |
| #include "chrome/installer/util/master_preferences.h" |
| #include "chrome/installer/util/master_preferences_constants.h" |
| #include "chrome/installer/util/util_constants.h" |
| +#include "chrome/installer/util/work_item.h" |
| #include "installer_util_strings.h" // NOLINT |
| @@ -531,11 +532,13 @@ class RegistryEntry { |
| // Generate work_item tasks required to create current registry entry and |
| // add them to the given work item list. |
| void AddToWorkItemList(HKEY root, WorkItemList *items) const { |
| - items->AddCreateRegKeyWorkItem(root, key_path_); |
| + items->AddCreateRegKeyWorkItem(root, key_path_, wow64_access_); |
| if (is_string_) { |
| - items->AddSetRegValueWorkItem(root, key_path_, name_, value_, true); |
| + items->AddSetRegValueWorkItem( |
| + root, key_path_, name_, value_, true, wow64_access_); |
| } else { |
| - items->AddSetRegValueWorkItem(root, key_path_, name_, int_value_, true); |
| + items->AddSetRegValueWorkItem( |
| + root, key_path_, name_, int_value_, true, wow64_access_); |
| } |
| } |
| @@ -575,26 +578,39 @@ class RegistryEntry { |
| // Create a object that represent default value of a key |
| RegistryEntry(const base::string16& key_path, const base::string16& value) |
| - : key_path_(key_path), name_(), |
| - is_string_(true), value_(value), int_value_(0) { |
| - } |
| + : key_path_(key_path), |
| + name_(), |
| + wow64_access_(0), // TODO(wfh): Add support for WOW64 registry view. |
|
grt (UTC plus 2)
2014/05/21 16:41:05
i don't know that this class will ever need to ove
Will Harris
2014/05/21 23:23:16
Done. I think 64-bit installers will have to remo
grt (UTC plus 2)
2014/05/22 01:37:44
Ah, good point. I'd forgotten about deleting the o
|
| + is_string_(true), |
| + value_(value), |
| + int_value_(0) {} |
| // Create a object that represent a key of type REG_SZ |
| - RegistryEntry(const base::string16& key_path, const base::string16& name, |
| + RegistryEntry(const base::string16& key_path, |
| + const base::string16& name, |
| const base::string16& value) |
| - : key_path_(key_path), name_(name), |
| - is_string_(true), value_(value), int_value_(0) { |
| - } |
| + : key_path_(key_path), |
| + name_(name), |
| + wow64_access_(0), |
| + is_string_(true), |
| + value_(value), |
| + int_value_(0) {} |
| // Create a object that represent a key of integer type |
| - RegistryEntry(const base::string16& key_path, const base::string16& name, |
| + RegistryEntry(const base::string16& key_path, |
| + const base::string16& name, |
| DWORD value) |
| - : key_path_(key_path), name_(name), |
| - is_string_(false), value_(), int_value_(value) { |
| - } |
| + : key_path_(key_path), |
| + name_(name), |
| + wow64_access_(0), |
| + is_string_(false), |
| + value_(), |
| + int_value_(value) {} |
| base::string16 key_path_; // key path for the registry entry |
| base::string16 name_; // name of the registry entry |
| + // Which view of the registry to use. |
| + REGSAM wow64_access_; |
| bool is_string_; // true if current registry entry is of type REG_SZ |
| base::string16 value_; // string value (useful if is_string_ = true) |
| DWORD int_value_; // integer value (useful if is_string_ = false) |
| @@ -1020,7 +1036,8 @@ void RemoveRunVerbOnWindows8(BrowserDistribution* dist, |
| run_verb_key.append(ShellUtil::kRegShellPath); |
| run_verb_key.push_back(base::FilePath::kSeparators[0]); |
| run_verb_key.append(ShellUtil::kRegVerbRun); |
| - InstallUtil::DeleteRegistryKey(root_key, run_verb_key); |
| + InstallUtil::DeleteRegistryKey(root_key, run_verb_key, |
| + WorkItem::kWow64Default); |
| } |
| } |