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

Issue 127343004: Avoid loading the last used browser profile in app_controller_mac when it's not needed. (Closed)

Created:
6 years, 11 months ago by tapted
Modified:
6 years, 11 months ago
Reviewers:
Nico
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, tfarina, chromium-apps-reviews_chromium.org
Visibility:
Public.

Description

Avoid loading the last used browser profile in app_controller_mac when it's not needed. Currently -[AppController applicationDidFinishLaunching:] and -[AppController windowLayeringDidChange:] can trigger a synchronous load of the last used _browser_ profile, even when no browsers are being opened, and that profile is not required. This causes delays when the app launcher or app shims are launched for a profile that doesn't match the last used browser profile, because both profiles must be loaded and initialized. This change moves ChromeBrowserMain's GetStartupProfilePath() from an anonymous namespace to startup_browser_creator.h so that AppController can share the logic that determines the profile loaded when the browser process starts up. The shim process is tweaked slightly to ensure it passes `--show-app-list` for the app launcher shim, similar to the Windows app launcher. This allows a newly created browser process to determine that the first thing it will be doing is showing a launcher. BUG=178260, 262848 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=245199

Patch Set 1 #

Patch Set 2 : Still need the IPC for now #

Patch Set 3 : need FPL #

Total comments: 2

Patch Set 4 : Rebase for comment-string merge conflict from r243939 #

Total comments: 6

Patch Set 5 : Clearer comments #

Patch Set 6 : Fix android link error (-> kProfileLastUsed setter is #ifdefed out in profile_manager.cc) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+116 lines, -33 lines) Patch
M apps/app_shim/chrome_main_app_mode_mac.mm View 1 2 3 4 1 chunk +10 lines, -2 lines 0 comments Download
M chrome/browser/app_controller_mac.mm View 2 chunks +12 lines, -6 lines 0 comments Download
M chrome/browser/chrome_browser_main.cc View 1 2 3 4 5 2 chunks +3 lines, -23 lines 0 comments Download
M chrome/browser/ui/app_list/app_list_service_interactive_uitest.cc View 1 2 3 4 4 chunks +67 lines, -2 lines 0 comments Download
M chrome/browser/ui/startup/startup_browser_creator.h View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/startup/startup_browser_creator.cc View 2 chunks +19 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
tapted
Hi Nico, could you take a look? Interesting parts are some small logic changes in ...
6 years, 11 months ago (2014-01-08 12:01:34 UTC) #1
tapted
thakis: ping?
6 years, 11 months ago (2014-01-09 22:07:14 UTC) #2
tapted
thakis@google -> thakis@chromium (sorry!).
6 years, 11 months ago (2014-01-10 05:21:32 UTC) #3
Nico
Looks harmless enough, lgtm. Thanks for including a test. https://codereview.chromium.org/127343004/diff/470001/apps/app_shim/chrome_main_app_mode_mac.mm File apps/app_shim/chrome_main_app_mode_mac.mm (right): https://codereview.chromium.org/127343004/diff/470001/apps/app_shim/chrome_main_app_mode_mac.mm#newcode610 apps/app_shim/chrome_main_app_mode_mac.mm:610: ...
6 years, 11 months ago (2014-01-14 02:06:34 UTC) #4
Nico
(And sorry about the delay :-/)
6 years, 11 months ago (2014-01-14 02:07:11 UTC) #5
tapted
Thanks Nico! https://codereview.chromium.org/127343004/diff/470001/apps/app_shim/chrome_main_app_mode_mac.mm File apps/app_shim/chrome_main_app_mode_mac.mm (right): https://codereview.chromium.org/127343004/diff/470001/apps/app_shim/chrome_main_app_mode_mac.mm#newcode610 apps/app_shim/chrome_main_app_mode_mac.mm:610: command_line.AppendSwitch(switches::kShowAppList); On 2014/01/14 02:06:34, Nico wrote: > ...
6 years, 11 months ago (2014-01-14 04:02:28 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tapted@chromium.org/127343004/580001
6 years, 11 months ago (2014-01-14 07:22:06 UTC) #7
commit-bot: I haz the power
Retried try job too often on android_clang_dbg for step(s) slave_steps http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_clang_dbg&number=106499
6 years, 11 months ago (2014-01-14 08:35:06 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tapted@chromium.org/127343004/680002
6 years, 11 months ago (2014-01-15 22:49:55 UTC) #9
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=247104
6 years, 11 months ago (2014-01-16 05:45:23 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tapted@chromium.org/127343004/680002
6 years, 11 months ago (2014-01-16 07:06:28 UTC) #11
commit-bot: I haz the power
6 years, 11 months ago (2014-01-16 15:47:41 UTC) #12
Message was sent while issue was closed.
Change committed as 245199

Powered by Google App Engine
This is Rietveld 408576698