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

Issue 9972012: Resolve the conflict that auto-launch has with the background mode feature (part 1). (Closed)

Created:
8 years, 8 months ago by Finnur
Modified:
8 years, 8 months ago
CC:
chromium-reviews, grt+watch_chromium.org
Visibility:
Public.

Description

Resolve the conflict that auto-launch has with the background mode feature. The Auto-launch experiment writes to the Run Registry key on Windows asking for Chrome to be started at login. The BackgroundModeManager writes to another Run Registry key asking for Chrome to be started without a window. We need to consolidate this into one Run key that specifies which feature you want as a command line flag to chrome.exe and make sure if a window is requested, then a window is shown (BackgroundModeManager doesn't care if the window is shown or not). BUG=123139, 53600 TEST=QA has testing instructions on how to test the experimental auto-launch feature (requires branded build). Not sure about testing instructions for background mode. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=133166

Patch Set 1 #

Total comments: 3

Patch Set 2 : #

Total comments: 15

Patch Set 3 : #

Total comments: 11

Patch Set 4 : #

Patch Set 5 : gclient sync, ignore #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+246 lines, -125 lines) Patch
M chrome/browser/background/background_mode_manager_win.cc View 1 2 3 4 3 chunks +7 lines, -55 lines 0 comments Download
M chrome/browser/profiles/profile_shortcut_manager_win.cc View 1 2 3 4 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/browser/ui/browser_init.cc View 1 2 3 4 5 chunks +15 lines, -11 lines 0 comments Download
M chrome/browser/ui/webui/options2/browser_options_handler2.cc View 1 2 3 4 2 chunks +8 lines, -5 lines 0 comments Download
M chrome/installer/setup/install.cc View 1 2 3 4 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/installer/setup/uninstall.cc View 1 2 3 4 1 chunk +2 lines, -6 lines 0 comments Download
M chrome/installer/util/auto_launch_util.h View 1 2 3 4 1 chunk +54 lines, -20 lines 0 comments Download
M chrome/installer/util/auto_launch_util.cc View 1 2 3 4 6 chunks +152 lines, -20 lines 5 comments Download

Messages

Total messages: 29 (0 generated)
Finnur
This changes my code to: 1) Support background mode feature sharing the Run key with ...
8 years, 8 months ago (2012-04-16 13:43:45 UTC) #1
grt (UTC plus 2)
hi finnur! i have a drive-by question about the overall approach. https://chromiumcodereview.appspot.com/9972012/diff/1/chrome/browser/profiles/profile_shortcut_manager_win.cc File chrome/browser/profiles/profile_shortcut_manager_win.cc (right): ...
8 years, 8 months ago (2012-04-16 15:30:14 UTC) #2
Finnur
https://chromiumcodereview.appspot.com/9972012/diff/1/chrome/browser/profiles/profile_shortcut_manager_win.cc File chrome/browser/profiles/profile_shortcut_manager_win.cc (right): https://chromiumcodereview.appspot.com/9972012/diff/1/chrome/browser/profiles/profile_shortcut_manager_win.cc#newcode215 chrome/browser/profiles/profile_shortcut_manager_win.cc:215: auto_launch_util::SetWillLaunchAtLogin( Can you elaborate a bit? Are you talking ...
8 years, 8 months ago (2012-04-16 15:43:48 UTC) #3
grt (UTC plus 2)
https://chromiumcodereview.appspot.com/9972012/diff/1/chrome/browser/profiles/profile_shortcut_manager_win.cc File chrome/browser/profiles/profile_shortcut_manager_win.cc (right): https://chromiumcodereview.appspot.com/9972012/diff/1/chrome/browser/profiles/profile_shortcut_manager_win.cc#newcode215 chrome/browser/profiles/profile_shortcut_manager_win.cc:215: auto_launch_util::SetWillLaunchAtLogin( My first thought was just different functions: one ...
8 years, 8 months ago (2012-04-16 15:48:47 UTC) #4
Finnur
I like how this simplifies the call sites. Please take another look. https://chromiumcodereview.appspot.com/9972012/diff/8001/chrome/browser/ui/browser_init.cc File chrome/browser/ui/browser_init.cc ...
8 years, 8 months ago (2012-04-16 18:09:07 UTC) #5
grt (UTC plus 2)
https://chromiumcodereview.appspot.com/9972012/diff/8001/chrome/browser/profiles/profile_shortcut_manager_win.cc File chrome/browser/profiles/profile_shortcut_manager_win.cc (right): https://chromiumcodereview.appspot.com/9972012/diff/8001/chrome/browser/profiles/profile_shortcut_manager_win.cc#newcode211 chrome/browser/profiles/profile_shortcut_manager_win.cc:211: if (auto_launch_util::WillLaunchAtLoginWithSwitch( can you do away with the "WithSwitch" ...
8 years, 8 months ago (2012-04-16 19:43:58 UTC) #6
Andrew T Wilson (Slow)
See my note about background mode not being specific to a given profile - given ...
8 years, 8 months ago (2012-04-16 22:57:33 UTC) #7
rpetterson
http://codereview.chromium.org/9972012/diff/8001/chrome/installer/util/auto_launch_util.cc File chrome/installer/util/auto_launch_util.cc (right): http://codereview.chromium.org/9972012/diff/8001/chrome/installer/util/auto_launch_util.cc#newcode179 chrome/installer/util/auto_launch_util.cc:179: void DisableBackgroundModeAtLogin(const string16& profile_directory) { I'm concerned this won't ...
8 years, 8 months ago (2012-04-17 01:02:11 UTC) #8
Andrew T Wilson (Slow)
I think the plan is that that routine will only be called when we have ...
8 years, 8 months ago (2012-04-17 01:32:15 UTC) #9
Finnur
PTAL. http://codereview.chromium.org/9972012/diff/8001/chrome/browser/ui/browser_init.cc File chrome/browser/ui/browser_init.cc (right): http://codereview.chromium.org/9972012/diff/8001/chrome/browser/ui/browser_init.cc#newcode383 chrome/browser/ui/browser_init.cc:383: Browser* browser = BrowserList::FindAnyBrowser(profile, true); Yes, this codepath ...
8 years, 8 months ago (2012-04-17 12:27:44 UTC) #10
grt (UTC plus 2)
hi finnur. i like how it's coming together. it seems that the naming isn't consistent. ...
8 years, 8 months ago (2012-04-17 15:08:58 UTC) #11
rpetterson
Re: DisableBackgroundModeAtLogin, Got it. SGTM.
8 years, 8 months ago (2012-04-18 00:41:34 UTC) #12
Andrew T Wilson (Slow)
Mostly looks good although I have one concern about backwards compatibility. http://codereview.chromium.org/9972012/diff/15002/chrome/browser/background/background_mode_manager_win.cc File chrome/browser/background/background_mode_manager_win.cc (right): ...
8 years, 8 months ago (2012-04-18 01:07:36 UTC) #13
Finnur
Good point on the backward compatibility issue. I've added a migration path that looks for ...
8 years, 8 months ago (2012-04-18 13:51:04 UTC) #14
Finnur
Also, Scott and James, can I get OWNERS approval for chrome/browser/ui and chrome/browser/ui/webui/options2 (respectively)?
8 years, 8 months ago (2012-04-18 13:53:24 UTC) #15
sky
LGTM
8 years, 8 months ago (2012-04-18 14:42:59 UTC) #16
Andrew T Wilson (Slow)
On 2012/04/18 13:51:04, Finnur wrote: > 1) If I close the only Chrome window and ...
8 years, 8 months ago (2012-04-18 17:28:48 UTC) #17
James Hawkins
I'm travelling today, added csilv.
8 years, 8 months ago (2012-04-18 17:58:36 UTC) #18
Finnur
James: Thanks. Andrew: I updated my tree to the latest code and now the crash ...
8 years, 8 months ago (2012-04-18 18:09:02 UTC) #19
Andrew T Wilson (Slow)
Well, here's what I see: bool already_running = browser_util::IsBrowserAlreadyRunning(); This will get set to true ...
8 years, 8 months ago (2012-04-18 18:33:31 UTC) #20
Finnur
Will do. Thanks. As for the CL, do you think it looks OK?
8 years, 8 months ago (2012-04-18 19:16:28 UTC) #21
csilv
On 2012/04/18 19:16:28, Finnur wrote: > Will do. Thanks. > > As for the CL, ...
8 years, 8 months ago (2012-04-18 19:21:19 UTC) #22
Andrew T Wilson (Slow)
One nit/suggestion that you can ignore, and one question - I think I'm ready to ...
8 years, 8 months ago (2012-04-18 23:07:51 UTC) #23
Finnur
http://codereview.chromium.org/9972012/diff/23001/chrome/installer/util/auto_launch_util.cc File chrome/installer/util/auto_launch_util.cc (right): http://codereview.chromium.org/9972012/diff/23001/chrome/installer/util/auto_launch_util.cc#newcode116 chrome/installer/util/auto_launch_util.cc:116: bool HasDeprecatedBackgroundModeSwitch() { Good idea. How about: CheckAndRemoveDeprecatedBackgroundModeSwitch? On ...
8 years, 8 months ago (2012-04-19 17:53:51 UTC) #24
Andrew T Wilson (Slow)
LGTM if we add that NOTREACHED() based on our conversation. http://codereview.chromium.org/9972012/diff/23001/chrome/installer/util/auto_launch_util.cc File chrome/installer/util/auto_launch_util.cc (right): http://codereview.chromium.org/9972012/diff/23001/chrome/installer/util/auto_launch_util.cc#newcode148 ...
8 years, 8 months ago (2012-04-20 00:30:13 UTC) #25
Finnur
rlp: Can you give OWNERS LG for profiles?
8 years, 8 months ago (2012-04-20 09:38:14 UTC) #26
Finnur
Also, I filed: http://code.google.com/p/chromium/issues/detail?id=124376 ... for the uninstall problem.
8 years, 8 months ago (2012-04-20 10:47:35 UTC) #27
rpetterson
LGTM. Sorry about that. Meant to before.
8 years, 8 months ago (2012-04-20 19:47:03 UTC) #28
Finnur
8 years, 8 months ago (2012-04-21 20:37:13 UTC) #29
rlp: No problem. No worries. All is well. :)

Powered by Google App Engine
This is Rietveld 408576698