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

Unified Diff: chrome/browser/shell_integration_win.cc

Issue 11367002: Add a flag to control whether there is a shortcut for the app list / launcher in the Windows taskba… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: woops Created 8 years, 2 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
Index: chrome/browser/shell_integration_win.cc
diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc
index 874faaabdcb673eb766ef40fe1f65622aea1bdd6..3726f0220e6410aad81fb134c8c8e06802d986b6 100644
--- a/chrome/browser/shell_integration_win.cc
+++ b/chrome/browser/shell_integration_win.cc
@@ -41,6 +41,8 @@ using content::BrowserThread;
namespace {
+const wchar_t kAppListAppName[] = L"ChromeAppList";
+
// Helper function for ShellIntegration::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 ".".
@@ -125,6 +127,10 @@ bool GetExpectedAppId(const FilePath& chrome_exe,
CommandLine command_line = CommandLine::FromString(base::StringPrintf(
L"\"%ls\" %ls", source.c_str(), arguments.c_str()));
+ // TODO(benwells): Update this to use a profile from the command line if it
+ // is specified. This will fix pinning multi-profile windows (except their
+ // icon) and also pinning apps, which use a profile flag to run in the correct
+ // profile.
FilePath profile_path;
if (command_line.HasSwitch(switches::kUserDataDir)) {
profile_path =
@@ -139,6 +145,8 @@ bool GetExpectedAppId(const FilePath& chrome_exe,
} else if (command_line.HasSwitch(switches::kAppId)) {
app_name = UTF8ToUTF16(web_app::GenerateApplicationNameFromExtensionId(
command_line.GetSwitchValueASCII(switches::kAppId)));
+ } else if (command_line.HasSwitch(switches::kShowAppList)) {
+ app_name = kAppListAppName;
} else {
BrowserDistribution* dist = BrowserDistribution::GetDistribution();
app_name = ShellUtil::GetBrowserModelId(
@@ -411,6 +419,12 @@ string16 ShellIntegration::GetChromiumModelIdForProfile(
profile_path);
}
+string16 ShellIntegration::GetAppListAppModelIdForProfile(
+ const FilePath& profile_path) {
+ return ShellIntegration::GetAppModelIdForProfile(kAppListAppName,
+ profile_path);
+}
+
string16 ShellIntegration::GetChromiumIconPath() {
// Determine the app path. If we can't determine what that is, we have
// bigger fish to fry...

Powered by Google App Engine
This is Rietveld 408576698