Chromium Code Reviews| Index: chrome/installer/gcapi/gcapi.cc |
| diff --git a/chrome/installer/gcapi/gcapi.cc b/chrome/installer/gcapi/gcapi.cc |
| index 73c5b73727648e76ceed22bb2b74c5a333b38ca2..c2424c7f8eab4d7ebf21ce6a6a27fd04d95a5ec3 100644 |
| --- a/chrome/installer/gcapi/gcapi.cc |
| +++ b/chrome/installer/gcapi/gcapi.cc |
| @@ -31,6 +31,7 @@ |
| #include "base/win/scoped_com_initializer.h" |
| #include "base/win/scoped_comptr.h" |
| #include "base/win/scoped_handle.h" |
| +#include "chrome/tools/launcher_support/chrome_launcher_support.h" |
|
Vitaly Buka (NO REVIEWS)
2012/06/13 18:01:36
invalid order
robertshield
2012/06/13 18:01:53
move this include down to line 39
erikwright (departed)
2012/06/13 19:43:43
Done.
erikwright (departed)
2012/06/13 19:43:43
Done.
|
| #include "chrome/installer/gcapi/gcapi_omaha_experiment.h" |
| #include "chrome/installer/gcapi/gcapi_reactivation.h" |
| #include "chrome/installer/util/google_update_constants.h" |
| @@ -373,30 +374,8 @@ BOOL __stdcall LaunchGoogleChrome() { |
| // Now grab the uninstall string from the appropriate ClientState key |
| // and use that as the base for a path to chrome.exe. |
| - FilePath chrome_exe_path; |
| - RegKey client_state(install_key, kChromeRegClientStateKey, KEY_QUERY_VALUE); |
| - if (client_state.Valid()) { |
| - std::wstring uninstall_string; |
| - if (client_state.ReadValue(installer::kUninstallStringField, |
| - &uninstall_string) == ERROR_SUCCESS) { |
| - // The uninstall path contains the path to setup.exe which is two levels |
| - // down from chrome.exe. Move up two levels (plus one to drop the file |
| - // name) and look for chrome.exe from there. |
| - FilePath uninstall_path(uninstall_string); |
| - chrome_exe_path = uninstall_path.DirName() |
| - .DirName() |
| - .DirName() |
| - .Append(installer::kChromeExe); |
| - if (!file_util::PathExists(chrome_exe_path)) { |
| - // By way of mild future proofing, look up one to see if there's a |
| - // chrome.exe in the version directory |
| - chrome_exe_path = |
| - uninstall_path.DirName().DirName().Append(installer::kChromeExe); |
| - } |
| - } |
| - } |
| - |
| - if (!file_util::PathExists(chrome_exe_path)) { |
| + FilePath chrome_exe_path = chrome_launcher_support::GetAnyChromePath(); |
|
robertshield
2012/06/13 18:01:53
prefer constructor syntax
erikwright (departed)
2012/06/13 19:43:43
Done.
|
| + if (chrome_exe_path.empty()) { |
| return false; |
| } |