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

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

Issue 282363003: Add WOW64 support to the installer registry work items (Closed) Base URL: https://chromium.googlesource.com/chromium/src
Patch Set: nits. fix call to DeleteRegistryKey Created 6 years, 7 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/setup/uninstall.cc ('k') | chrome/installer/util/copy_reg_key_work_item.h » ('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 #include "chrome/installer/util/app_command.h" 5 #include "chrome/installer/util/app_command.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/win/registry.h" 8 #include "base/win/registry.h"
9 #include "chrome/installer/util/google_update_constants.h" 9 #include "chrome/installer/util/google_update_constants.h"
10 #include "chrome/installer/util/work_item_list.h" 10 #include "chrome/installer/util/work_item_list.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 key.ReadValueDW(kNameBoolVars[i].name, &value); 63 key.ReadValueDW(kNameBoolVars[i].name, &value);
64 this->*(kNameBoolVars[i].data) = (value != 0); 64 this->*(kNameBoolVars[i].data) = (value != 0);
65 } 65 }
66 66
67 return true; 67 return true;
68 } 68 }
69 69
70 void AppCommand::AddWorkItems(HKEY predefined_root, 70 void AppCommand::AddWorkItems(HKEY predefined_root,
71 const base::string16& command_path, 71 const base::string16& command_path,
72 WorkItemList* item_list) const { 72 WorkItemList* item_list) const {
73 item_list->AddCreateRegKeyWorkItem(predefined_root, command_path) 73 item_list->AddCreateRegKeyWorkItem(
74 predefined_root, command_path, WorkItem::kWow64Default)
74 ->set_log_message("creating AppCommand registry key"); 75 ->set_log_message("creating AppCommand registry key");
75 item_list->AddSetRegValueWorkItem(predefined_root, command_path, 76 item_list->AddSetRegValueWorkItem(predefined_root,
77 command_path,
78 WorkItem::kWow64Default,
76 google_update::kRegCommandLineField, 79 google_update::kRegCommandLineField,
77 command_line_, true) 80 command_line_,
81 true)
78 ->set_log_message("setting AppCommand CommandLine registry value"); 82 ->set_log_message("setting AppCommand CommandLine registry value");
79 83
80 for (int i = 0; i < arraysize(kNameBoolVars); ++i) { 84 for (int i = 0; i < arraysize(kNameBoolVars); ++i) {
81 const wchar_t* var_name = kNameBoolVars[i].name; 85 const wchar_t* var_name = kNameBoolVars[i].name;
82 bool var_data = this->*(kNameBoolVars[i].data); 86 bool var_data = this->*(kNameBoolVars[i].data);
83 87
84 // Adds a work item to set |var_name| to DWORD 1 if |var_data| is true; 88 // Adds a work item to set |var_name| to DWORD 1 if |var_data| is true;
85 // adds a work item to remove |var_name| otherwise. 89 // adds a work item to remove |var_name| otherwise.
86 if (var_data) { 90 if (var_data) {
87 item_list->AddSetRegValueWorkItem(predefined_root, 91 item_list->AddSetRegValueWorkItem(predefined_root,
88 command_path, 92 command_path,
93 WorkItem::kWow64Default,
89 var_name, 94 var_name,
90 static_cast<DWORD>(1), 95 static_cast<DWORD>(1),
91 true); 96 true);
92 } else { 97 } else {
93 item_list->AddDeleteRegValueWorkItem(predefined_root, 98 item_list->AddDeleteRegValueWorkItem(
94 command_path, 99 predefined_root, command_path, WorkItem::kWow64Default, var_name);
95 var_name);
96 } 100 }
97 } 101 }
98 } 102 }
99 103
100 } // namespace installer 104 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/setup/uninstall.cc ('k') | chrome/installer/util/copy_reg_key_work_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698