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

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

Issue 300593002: Make omaha, gcapi and uninstall registry accesses use Wow6432Node on 64-bit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move the uninstall registry access to 32-bit 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This file defines functions that integrate Chrome in Windows shell. These 5 // This file defines functions that integrate Chrome in Windows shell. These
6 // functions can be used by Chrome as well as Chrome installer. All of the 6 // functions can be used by Chrome as well as Chrome installer. All of the
7 // work is done by the local functions defined in anonymous namespace in 7 // work is done by the local functions defined in anonymous namespace in
8 // this class. 8 // this class.
9 9
10 #include "chrome/installer/util/shell_util.h" 10 #include "chrome/installer/util/shell_util.h"
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 const base::string16& protocol) { 705 const base::string16& protocol) {
706 // Only user-level installs prior to Windows 8 should need to elevate to 706 // Only user-level installs prior to Windows 8 should need to elevate to
707 // register. 707 // register.
708 DCHECK(InstallUtil::IsPerUserInstall(chrome_exe.c_str())); 708 DCHECK(InstallUtil::IsPerUserInstall(chrome_exe.c_str()));
709 DCHECK_LT(base::win::GetVersion(), base::win::VERSION_WIN8); 709 DCHECK_LT(base::win::GetVersion(), base::win::VERSION_WIN8);
710 base::FilePath exe_path = 710 base::FilePath exe_path =
711 base::FilePath(chrome_exe).DirName().Append(installer::kSetupExe); 711 base::FilePath(chrome_exe).DirName().Append(installer::kSetupExe);
712 if (!base::PathExists(exe_path)) { 712 if (!base::PathExists(exe_path)) {
713 HKEY reg_root = InstallUtil::IsPerUserInstall(chrome_exe.c_str()) ? 713 HKEY reg_root = InstallUtil::IsPerUserInstall(chrome_exe.c_str()) ?
714 HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE; 714 HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE;
715 RegKey key(reg_root, dist->GetUninstallRegPath().c_str(), KEY_READ); 715 RegKey key(reg_root, dist->GetUninstallRegPath().c_str(),
716 KEY_READ | KEY_WOW64_32KEY);
grt (UTC plus 2) 2014/05/27 16:42:08 i think this should be in the default; see other c
Will Harris 2014/05/27 19:25:10 see general comment on 32/64 uninstall.
716 base::string16 uninstall_string; 717 base::string16 uninstall_string;
717 key.ReadValue(installer::kUninstallStringField, &uninstall_string); 718 key.ReadValue(installer::kUninstallStringField, &uninstall_string);
718 CommandLine command_line = CommandLine::FromString(uninstall_string); 719 CommandLine command_line = CommandLine::FromString(uninstall_string);
719 exe_path = command_line.GetProgram(); 720 exe_path = command_line.GetProgram();
720 } 721 }
721 722
722 if (base::PathExists(exe_path)) { 723 if (base::PathExists(exe_path)) {
723 CommandLine cmd(exe_path); 724 CommandLine cmd(exe_path);
724 cmd.AppendSwitchNative(installer::switches::kRegisterChromeBrowser, 725 cmd.AppendSwitchNative(installer::switches::kRegisterChromeBrowser,
725 chrome_exe); 726 chrome_exe);
(...skipping 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after
2268 // are any left...). 2269 // are any left...).
2269 if (free_bits >= 8 && next_byte_index < size) { 2270 if (free_bits >= 8 && next_byte_index < size) {
2270 free_bits -= 8; 2271 free_bits -= 8;
2271 bit_stream += bytes[next_byte_index++] << free_bits; 2272 bit_stream += bytes[next_byte_index++] << free_bits;
2272 } 2273 }
2273 } 2274 }
2274 2275
2275 DCHECK_EQ(ret.length(), encoded_length); 2276 DCHECK_EQ(ret.length(), encoded_length);
2276 return ret; 2277 return ret;
2277 } 2278 }
OLDNEW
« chrome/installer/util/installation_state.cc ('K') | « chrome/installer/util/product.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698