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

Unified Diff: apps/app_shim/chrome_main_app_mode_mac.mm

Issue 127343004: Avoid loading the last used browser profile in app_controller_mac when it's not needed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix android link error (-> kProfileLastUsed setter is #ifdefed out in profile_manager.cc) Created 6 years, 11 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 | chrome/browser/app_controller_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/app_shim/chrome_main_app_mode_mac.mm
diff --git a/apps/app_shim/chrome_main_app_mode_mac.mm b/apps/app_shim/chrome_main_app_mode_mac.mm
index 2c13ba23c29ec3de0afd7e68c465542fb17e6ced..53a823cfea2820ad11ae7af0ba4dbe0c7fc8b576 100644
--- a/apps/app_shim/chrome_main_app_mode_mac.mm
+++ b/apps/app_shim/chrome_main_app_mode_mac.mm
@@ -605,8 +605,16 @@ int ChromeAppModeStart(const app_mode::ChromeAppModeInfo* info) {
ProcessSerialNumber psn;
CommandLine command_line(CommandLine::NO_PROGRAM);
command_line.AppendSwitch(switches::kSilentLaunch);
- command_line.AppendSwitchPath(switches::kProfileDirectory,
- info->profile_dir);
+
+ // If the shim is the app launcher, pass --show-app-list when starting a new
+ // Chrome process to inform startup codepaths and load the correct profile.
+ if (info->app_mode_id == app_mode::kAppListModeId) {
+ command_line.AppendSwitch(switches::kShowAppList);
+ } else {
+ command_line.AppendSwitchPath(switches::kProfileDirectory,
+ info->profile_dir);
+ }
+
bool success =
base::mac::OpenApplicationWithPath(base::mac::OuterBundlePath(),
command_line,
« no previous file with comments | « no previous file | chrome/browser/app_controller_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698