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

Unified Diff: chrome/browser/shell_integration_win.cc

Issue 2005163002: Avoid clobbering the app list pinned taskbar shortcut on startup (for now). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: respond to comments Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9720ca5b4197d3780a98632c42594a77611fe90d 100644
--- a/chrome/browser/shell_integration_win.cc
+++ b/chrome/browser/shell_integration_win.cc
@@ -95,6 +95,14 @@ base::string16 GetProfileIdFromPath(const base::FilePath& profile_path) {
return profile_id;
}
+base::string16 GetAppListAppName() {
+ static const base::char16 kAppListAppNameSuffix[] = L"AppList";
+ 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 +135,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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698