diff options
author | huangs@chromium.org <huangs@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-22 03:10:14 +0000 |
---|---|---|
committer | huangs@chromium.org <huangs@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-22 03:10:14 +0000 |
commit | 84379e5c5f4d36af13346336f04fbcbb09758988 (patch) | |
tree | faeb201a76c7d442ac2d76521d47d69ef2fbbe31 /chrome/installer/launcher_support | |
parent | c6f0cf64b733ab364ef19f4fe292c4b7e14dfe92 (diff) | |
download | chromium_src-84379e5c5f4d36af13346336f04fbcbb09758988.zip chromium_src-84379e5c5f4d36af13346336f04fbcbb09758988.tar.gz chromium_src-84379e5c5f4d36af13346336f04fbcbb09758988.tar.bz2 |
App Launcher dr=1: limit to Chrome, and stop using ChromeAppHostDistribution to set it.
This CL does 2 things:
1. The setting of App Launcher dr=1 is now only used for GOOGLE_CHROME_BUILD.
2. Refactoring: In r273321, we extracted AppRegistrationData from BrowserDistribution,
and make it part of BrowserDistribution by composition. In this CL, we
use this new flexibility, and cut the dependence of app_list_service_win.cc
on ChromeAppHostDistribution by just giving it the AppRegistrationData part
it needs.
The required const kAppLauncherGuid now lives in chrome_launcher_support.
BUG=297647
Review URL: https://codereview.chromium.org/374413004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284605 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/launcher_support')
-rw-r--r-- | chrome/installer/launcher_support/chrome_launcher_support.cc | 13 | ||||
-rw-r--r-- | chrome/installer/launcher_support/chrome_launcher_support.h | 3 |
2 files changed, 9 insertions, 7 deletions
diff --git a/chrome/installer/launcher_support/chrome_launcher_support.cc b/chrome/installer/launcher_support/chrome_launcher_support.cc index fdac65c..8e5b6a5 100644 --- a/chrome/installer/launcher_support/chrome_launcher_support.cc +++ b/chrome/installer/launcher_support/chrome_launcher_support.cc @@ -29,9 +29,6 @@ const wchar_t kGoogleRegClientStateKey[] = const wchar_t kGoogleRegClientsKey[] = L"Software\\Google\\Update\\Clients"; const wchar_t kRegVersionField[] = L"pv"; -// Copied from binaries_installer_internal.cc -const wchar_t kAppHostAppId[] = L"{FDA71E6F-AC4C-4a00-8B70-9958A68906BF}"; - // Copied from chrome_appid.cc. const wchar_t kBinariesAppGuid[] = L"{4DC8B4CA-1BDA-483e-B5FA-D3C12E15B62D}"; @@ -86,7 +83,7 @@ bool IsProductInstalled(InstallationLevel level, const wchar_t* app_guid) { bool IsAppLauncherEnabledAtLevel(InstallationLevel level) { base::string16 uninstall_arguments; if (GetClientStateValue(level, - kAppHostAppId, + kAppLauncherGuid, kUninstallArgumentsField, &uninstall_arguments)) { return CommandLine::FromString(L"dummy.exe " + uninstall_arguments) @@ -134,13 +131,15 @@ base::FilePath FindExeRelativeToSetupExe(const base::FilePath setup_exe_path, } // namespace +const wchar_t kAppLauncherGuid[] = L"{FDA71E6F-AC4C-4a00-8B70-9958A68906BF}"; + void UninstallLegacyAppLauncher(InstallationLevel level) { - base::FilePath setup_exe(GetSetupExeFromRegistry(level, kAppHostAppId)); + base::FilePath setup_exe(GetSetupExeFromRegistry(level, kAppLauncherGuid)); if (setup_exe.empty()) return; base::string16 uninstall_arguments; if (GetClientStateValue(level, - kAppHostAppId, + kAppLauncherGuid, kUninstallArgumentsField, &uninstall_arguments)) { CommandLine uninstall_cmd = CommandLine::FromString( @@ -170,7 +169,7 @@ base::FilePath GetChromePathForInstallationLevel(InstallationLevel level) { base::FilePath GetAppHostPathForInstallationLevel(InstallationLevel level) { return FindExeRelativeToSetupExe( - GetSetupExeFromRegistry(level, kAppHostAppId), kChromeAppHostExe); + GetSetupExeFromRegistry(level, kAppLauncherGuid), kChromeAppHostExe); } base::FilePath GetChromeSxSPathForInstallationLevel(InstallationLevel level) { diff --git a/chrome/installer/launcher_support/chrome_launcher_support.h b/chrome/installer/launcher_support/chrome_launcher_support.h index 1a8847f..f50ff28 100644 --- a/chrome/installer/launcher_support/chrome_launcher_support.h +++ b/chrome/installer/launcher_support/chrome_launcher_support.h @@ -22,6 +22,9 @@ enum InstallationState { INSTALLED_AT_SYSTEM_LEVEL, }; +// The app GUID for Chrome App Launcher. +extern const wchar_t kAppLauncherGuid[]; + // Returns the path to an existing setup.exe at the specified level, if it can // be found via Omaha client state. base::FilePath GetSetupExeForInstallationLevel(InstallationLevel level); |