diff options
author | benwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-15 21:22:56 +0000 |
---|---|---|
committer | benwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-15 21:22:56 +0000 |
commit | da1ffc39431cad3ee0ca22f81179bfcaebf814b4 (patch) | |
tree | 05aec358c19d08cfa9d4d6d66dc986db52918a82 /chrome/browser/shell_integration_win.cc | |
parent | ada8d715379d1dcde5e62f36284f4df3c98c8c53 (diff) | |
download | chromium_src-da1ffc39431cad3ee0ca22f81179bfcaebf814b4.zip chromium_src-da1ffc39431cad3ee0ca22f81179bfcaebf814b4.tar.gz chromium_src-da1ffc39431cad3ee0ca22f81179bfcaebf814b4.tar.bz2 |
[win] Ensure canary app launcher shortcut has a different app model id to the official one.
This change uses the browser distribution to create the app model id. It does not change
the app model id used for chrome or chromium official channel builds, but does change
the app model id for canary distribution.
BUG=176456
Review URL: https://chromiumcodereview.appspot.com/12252064
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182830 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/shell_integration_win.cc')
-rw-r--r-- | chrome/browser/shell_integration_win.cc | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc index f133469..5dd8083 100644 --- a/chrome/browser/shell_integration_win.cc +++ b/chrome/browser/shell_integration_win.cc @@ -41,11 +41,7 @@ using content::BrowserThread; namespace { -#if defined(GOOGLE_CHROME_BUILD) -const wchar_t kAppListAppName[] = L"ChromeAppList"; -#else -const wchar_t kAppListAppName[] = L"ChromiumAppList"; -#endif +const wchar_t kAppListAppNameSuffix[] = L"AppList"; // Helper function for ShellIntegration::GetAppId to generates profile id // from profile path. "profile_id" is composed of sanitized basenames of @@ -83,6 +79,13 @@ string16 GetProfileIdFromPath(const base::FilePath& profile_path) { return profile_id; } +string16 GetAppListAppName() { + BrowserDistribution* dist = BrowserDistribution::GetDistribution(); + string16 app_name(dist->GetBaseAppId()); + app_name.append(kAppListAppNameSuffix); + return app_name; +} + // Gets expected app id for given Chrome (based on |command_line| and // |is_per_user_install|). string16 GetExpectedAppId(const CommandLine& command_line, @@ -102,7 +105,7 @@ string16 GetExpectedAppId(const CommandLine& command_line, app_name = UTF8ToUTF16(web_app::GenerateApplicationNameFromExtensionId( command_line.GetSwitchValueASCII(switches::kAppId))); } else if (command_line.HasSwitch(switches::kShowAppList)) { - app_name = kAppListAppName; + app_name = GetAppListAppName(); } else { BrowserDistribution* dist = BrowserDistribution::GetDistribution(); app_name = ShellUtil::GetBrowserModelId(dist, is_per_user_install); @@ -339,8 +342,8 @@ string16 ShellIntegration::GetChromiumModelIdForProfile( string16 ShellIntegration::GetAppListAppModelIdForProfile( const base::FilePath& profile_path) { - return ShellIntegration::GetAppModelIdForProfile(kAppListAppName, - profile_path); + return ShellIntegration::GetAppModelIdForProfile( + GetAppListAppName(), profile_path); } string16 ShellIntegration::GetChromiumIconLocation() { |