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

Side by Side Diff: chrome/installer/util/helper.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: rebase 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
« no previous file with comments | « chrome/installer/util/google_update_settings.cc ('k') | chrome/installer/util/install_util.cc » ('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) 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 #include "chrome/installer/util/helper.h" 5 #include "chrome/installer/util/helper.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 "base/path_service.h" 9 #include "base/path_service.h"
10 #include "chrome/installer/util/browser_distribution.h" 10 #include "chrome/installer/util/browser_distribution.h"
11 #include "chrome/installer/util/install_util.h" 11 #include "chrome/installer/util/install_util.h"
12 #include "chrome/installer/util/installation_state.h" 12 #include "chrome/installer/util/installation_state.h"
13 #include "chrome/installer/util/util_constants.h" 13 #include "chrome/installer/util/util_constants.h"
14 14
15 namespace installer { 15 namespace installer {
16 16
17 base::FilePath GetChromeInstallPath(bool system_install, 17 base::FilePath GetChromeInstallPath(bool system_install,
18 BrowserDistribution* dist) { 18 BrowserDistribution* dist) {
19 base::FilePath install_path; 19 base::FilePath install_path;
20 #if defined(_WIN64)
21 // TODO(wfh): Place Chrome binaries into DIR_PROGRAM_FILESX86 until the code
22 // to support moving the binaries is added.
23 int key =
24 system_install ? base::DIR_PROGRAM_FILESX86 : base::DIR_LOCAL_APP_DATA;
25 #else
20 int key = system_install ? base::DIR_PROGRAM_FILES : base::DIR_LOCAL_APP_DATA; 26 int key = system_install ? base::DIR_PROGRAM_FILES : base::DIR_LOCAL_APP_DATA;
27 #endif
21 if (PathService::Get(key, &install_path)) { 28 if (PathService::Get(key, &install_path)) {
22 install_path = install_path.Append(dist->GetInstallSubDir()); 29 install_path = install_path.Append(dist->GetInstallSubDir());
23 install_path = install_path.Append(kInstallBinaryDir); 30 install_path = install_path.Append(kInstallBinaryDir);
24 } 31 }
25 return install_path; 32 return install_path;
26 } 33 }
27 34
28 BrowserDistribution* GetBinariesDistribution(bool system_install) { 35 BrowserDistribution* GetBinariesDistribution(bool system_install) {
29 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); 36 BrowserDistribution* dist = BrowserDistribution::GetDistribution();
30 ProductState state; 37 ProductState state;
31 38
32 // If we're part of a multi-install, we need to poll using the multi-installer 39 // If we're part of a multi-install, we need to poll using the multi-installer
33 // package's app guid rather than the browser's or Chrome Frame's app guid. 40 // package's app guid rather than the browser's or Chrome Frame's app guid.
34 // If we can't read the app's state from the registry, assume it isn't 41 // If we can't read the app's state from the registry, assume it isn't
35 // multi-installed. 42 // multi-installed.
36 if (state.Initialize(system_install, dist) && state.is_multi_install()) { 43 if (state.Initialize(system_install, dist) && state.is_multi_install()) {
37 return BrowserDistribution::GetSpecificDistribution( 44 return BrowserDistribution::GetSpecificDistribution(
38 BrowserDistribution::CHROME_BINARIES); 45 BrowserDistribution::CHROME_BINARIES);
39 } else { 46 } else {
40 return dist; 47 return dist;
41 } 48 }
42 } 49 }
43 50
44 std::wstring GetAppGuidForUpdates(bool system_install) { 51 std::wstring GetAppGuidForUpdates(bool system_install) {
45 return GetBinariesDistribution(system_install)->GetAppGuid(); 52 return GetBinariesDistribution(system_install)->GetAppGuid();
46 } 53 }
47 54
48 } // namespace installer. 55 } // namespace installer.
OLDNEW
« no previous file with comments | « chrome/installer/util/google_update_settings.cc ('k') | chrome/installer/util/install_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698