Chromium Code Reviews| Index: chrome/browser/shell_integration_win.cc |
| diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc |
| index eaf5c403138683f41daeae20a80e700392893719..924ba48678e58f4c5bce6e9eb728ed55eb950fab 100644 |
| --- a/chrome/browser/shell_integration_win.cc |
| +++ b/chrome/browser/shell_integration_win.cc |
| @@ -59,6 +59,8 @@ namespace shell_integration { |
| namespace { |
| +const wchar_t kAppListAppNameSuffix[] = L"AppList"; |
|
gab
2016/05/24 16:01:24
Inline as a "static base::char16[]" in GetAppListA
gab
2016/05/24 16:01:25
s/wchar_t/base::char16/
(identical on Windows but
tapted
2016/05/25 00:32:41
Done.
tapted
2016/05/25 00:32:41
Done.
|
| + |
| // Helper function for GetAppId to generates profile id |
| // from profile path. "profile_id" is composed of sanitized basenames of |
| // user data dir and profile dir joined by a ".". |
| @@ -95,6 +97,13 @@ base::string16 GetProfileIdFromPath(const base::FilePath& profile_path) { |
| return profile_id; |
| } |
| +base::string16 GetAppListAppName() { |
| + BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
| + base::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|). |
| base::string16 GetExpectedAppId(const base::CommandLine& command_line, |
| @@ -127,6 +136,8 @@ base::string16 GetExpectedAppId(const base::CommandLine& command_line, |
| app_name = base::UTF8ToUTF16( |
| web_app::GenerateApplicationNameFromExtensionId( |
| command_line.GetSwitchValueASCII(switches::kAppId))); |
| + } else if (command_line.HasSwitch(switches::kShowAppList)) { |
| + app_name = GetAppListAppName(); |
| } else { |
| BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
| app_name = ShellUtil::GetBrowserModelId(dist, is_per_user_install); |