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

Side by Side Diff: chrome/installer/gcapi/gcapi.cc

Issue 685103004: Refactor chrome_launcher_support::GetAnyChromePath. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix app_installer compile. Created 5 years, 11 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
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 // NOTE: This code is a legacy utility API for partners to check whether 5 // NOTE: This code is a legacy utility API for partners to check whether
6 // Chrome can be installed and launched. Recent updates are being made 6 // Chrome can be installed and launched. Recent updates are being made
7 // to add new functionality. These updates use code from Chromium, the old 7 // to add new functionality. These updates use code from Chromium, the old
8 // coded against the win32 api directly. If you have an itch to shave a 8 // coded against the win32 api directly. If you have an itch to shave a
9 // yak, feel free to re-write the old code too. 9 // yak, feel free to re-write the old code too.
10 10
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 HKEY install_key = HKEY_LOCAL_MACHINE; 384 HKEY install_key = HKEY_LOCAL_MACHINE;
385 if (!IsChromeInstalled(install_key)) { 385 if (!IsChromeInstalled(install_key)) {
386 install_key = HKEY_CURRENT_USER; 386 install_key = HKEY_CURRENT_USER;
387 if (!IsChromeInstalled(install_key)) { 387 if (!IsChromeInstalled(install_key)) {
388 return false; 388 return false;
389 } 389 }
390 } 390 }
391 391
392 // Now grab the uninstall string from the appropriate ClientState key 392 // Now grab the uninstall string from the appropriate ClientState key
393 // and use that as the base for a path to chrome.exe. 393 // and use that as the base for a path to chrome.exe.
394 *chrome_exe_path = 394 *chrome_exe_path = chrome_launcher_support::GetChromePathForInstallationLevel(
395 chrome_launcher_support::GetChromePathForInstallationLevel( 395 install_key == HKEY_LOCAL_MACHINE
396 install_key == HKEY_LOCAL_MACHINE ? 396 ? chrome_launcher_support::SYSTEM_LEVEL_INSTALLATION
397 chrome_launcher_support::SYSTEM_LEVEL_INSTALLATION : 397 : chrome_launcher_support::USER_LEVEL_INSTALLATION,
398 chrome_launcher_support::USER_LEVEL_INSTALLATION); 398 false /* is_sxs */);
399 return !chrome_exe_path->empty(); 399 return !chrome_exe_path->empty();
400 } 400 }
401 401
402 } // namespace 402 } // namespace
403 403
404 BOOL __stdcall GoogleChromeCompatibilityCheck(BOOL set_flag, 404 BOOL __stdcall GoogleChromeCompatibilityCheck(BOOL set_flag,
405 int shell_mode, 405 int shell_mode,
406 DWORD* reasons) { 406 DWORD* reasons) {
407 DWORD local_reasons = 0; 407 DWORD local_reasons = 0;
408 408
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 key.WriteValue(kRelaunchAllowedAfterValue, 789 key.WriteValue(kRelaunchAllowedAfterValue,
790 FormatDateOffsetByMonths(6)) != ERROR_SUCCESS || 790 FormatDateOffsetByMonths(6)) != ERROR_SUCCESS ||
791 !SetRelaunchExperimentLabels(relaunch_brandcode, shell_mode)) { 791 !SetRelaunchExperimentLabels(relaunch_brandcode, shell_mode)) {
792 if (error_code) 792 if (error_code)
793 *error_code = RELAUNCH_ERROR_RELAUNCH_FAILED; 793 *error_code = RELAUNCH_ERROR_RELAUNCH_FAILED;
794 return FALSE; 794 return FALSE;
795 } 795 }
796 796
797 return TRUE; 797 return TRUE;
798 } 798 }
OLDNEW
« no previous file with comments | « chrome/app_shim/win/app_shim_main.cc ('k') | chrome/installer/launcher_support/chrome_launcher_support.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698