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

Issue 21150006: Introduce --cancel-first-run and reduce the strength of --no-first-run. (Closed)

Created:
7 years, 4 months ago by gab
Modified:
7 years, 4 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, nkostylev+watch_chromium.org, grt+watch_chromium.org, amit, robertshield, oshima+watch_chromium.org, chromium-apps-reviews_chromium.org, native-client-reviews_googlegroups.com, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

Introduce --cancel-first-run and reduce the strength of --no-first-run. --cancel-first-run has the same behavior as the old --no-first-run in that it writes the First Run sentinel (to prevent any later launch from being considered first run) on top of preventing the current run from being considered first run. In most situations this is too strong and the consumer actually only wants to prevent the current run from being first run; while still allowing a future launch of chrome to be the first run. This changes the behavior of Chrome Frame which now doesn't write the First Run sentinel (and thus allows a subsequent run of the real Chrome to be first run). The only case where --cancel-first-run is actually needed is when a user-level Chrome which has already gone through first run self-destructs upon finding a system-level Chrome install on the same machine. After uninstalling itself, it launches system-level Chrome and needs --cancel-first-run to tell it that it should not do first run and just load the current user's prefs straight up (essentially resulting in the same thing as a regular launch of the user-level Chrome from the user's pov). This is a follow-up on the discussion @ https://codereview.chromium.org/20483002/diff/10002/chrome/browser/first_run/first_run.cc#newcode492 and https://codereview.chromium.org/20483002/diff/10002/chrome/browser/chrome_browser_main.cc#oldcode988 Note that InProcessBrowserTest already adds --no-first-run to all tests, so respecifying the flag in sub-test-fixtures is superfluous and such code was removed in this CL as well. To make sure that no instance of --no-first-run was ignored, patch set 10 actually replaces all instances of --no-first-run by --skip-first-run. It was however deemed too complex (https://codereview.chromium.org/21150006/diff/41001/chrome/common/chrome_switches.cc#oldcode968) to fully replace the flag since many tools outside of Chrome's codebase use --no-first-run and updating all of them to --skip-first-run just to keep the current behavior seemed like overkill. Patch set 11 thus reverted all --skip-first-run flags to --no-first-run. BUG=265549 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=216460

Patch Set 1 #

Patch Set 2 : Replace hardcoded --no-first-run in scripts #

Total comments: 7

Patch Set 3 : add first_run::IsFirstRunSuppressed() #

Total comments: 3

Patch Set 4 : merge #

Patch Set 5 : fix compile #

Patch Set 6 : merge up to r214457 #

Patch Set 7 : merge up to r215889 #

Patch Set 8 : add missing no-first-run flag changes #

Patch Set 9 : add fwd-decl #

Patch Set 10 : merge up to r216177 #

Patch Set 11 : --skip-first-run => --no-first-run #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -9 lines) Patch
M chrome/browser/chrome_browser_main_mac.mm View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/login_browsertest.cc View 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/first_run/first_run.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/first_run/first_run.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +8 lines, -2 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -1 line 0 comments Download
M chrome/installer/setup/setup_main.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/nacl/nacl_browsertest_util.cc View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 18 (0 generated)
gab
Carlos, PTAL, as discussed on https://codereview.chromium.org/20483002/ Greg, do the CF side-effects LGTY? Or should we ...
7 years, 4 months ago (2013-07-29 21:22:07 UTC) #1
grt (UTC plus 2)
Nice idea. https://codereview.chromium.org/21150006/diff/16001/chrome/browser/chrome_browser_main_mac.mm File chrome/browser/chrome_browser_main_mac.mm (right): https://codereview.chromium.org/21150006/diff/16001/chrome/browser/chrome_browser_main_mac.mm#newcode243 chrome/browser/chrome_browser_main_mac.mm:243: if (!parsed_command_line().HasSwitch(switches::kCancelFirstRun) && how about abstracting the ...
7 years, 4 months ago (2013-07-30 02:48:16 UTC) #2
gab
https://codereview.chromium.org/21150006/diff/16001/chrome/browser/first_run/first_run.cc File chrome/browser/first_run/first_run.cc (left): https://codereview.chromium.org/21150006/diff/16001/chrome/browser/first_run/first_run.cc#oldcode486 chrome/browser/first_run/first_run.cc:486: internal::first_run_ = internal::FIRST_RUN_CANCEL; On 2013/07/30 02:48:16, grt wrote: > ...
7 years, 4 months ago (2013-07-30 12:58:54 UTC) #3
gab
See comments below. Thanks! Gab https://codereview.chromium.org/21150006/diff/16001/chrome/browser/chrome_browser_main_mac.mm File chrome/browser/chrome_browser_main_mac.mm (right): https://codereview.chromium.org/21150006/diff/16001/chrome/browser/chrome_browser_main_mac.mm#newcode243 chrome/browser/chrome_browser_main_mac.mm:243: if (!parsed_command_line().HasSwitch(switches::kCancelFirstRun) && On ...
7 years, 4 months ago (2013-07-30 14:10:17 UTC) #4
grt (UTC plus 2)
this code lgtm, although i find the change in first_run.cc hard to review since it's ...
7 years, 4 months ago (2013-07-30 14:21:11 UTC) #5
cpu_(ooo_6.6-7.5)
lgtm https://codereview.chromium.org/21150006/diff/41001/chrome/common/chrome_switches.cc File chrome/common/chrome_switches.cc (left): https://codereview.chromium.org/21150006/diff/41001/chrome/common/chrome_switches.cc#oldcode968 chrome/common/chrome_switches.cc:968: const char kNoFirstRun[] = "no-first-run"; please check/search if ...
7 years, 4 months ago (2013-07-30 21:41:36 UTC) #6
gab
https://codereview.chromium.org/21150006/diff/41001/chrome/common/chrome_switches.cc File chrome/common/chrome_switches.cc (left): https://codereview.chromium.org/21150006/diff/41001/chrome/common/chrome_switches.cc#oldcode968 chrome/common/chrome_switches.cc:968: const char kNoFirstRun[] = "no-first-run"; On 2013/07/30 21:41:36, cpu ...
7 years, 4 months ago (2013-07-31 00:00:51 UTC) #7
gab
ping, see below https://codereview.chromium.org/21150006/diff/41001/chrome/common/chrome_switches.cc File chrome/common/chrome_switches.cc (left): https://codereview.chromium.org/21150006/diff/41001/chrome/common/chrome_switches.cc#oldcode968 chrome/common/chrome_switches.cc:968: const char kNoFirstRun[] = "no-first-run"; On ...
7 years, 4 months ago (2013-08-01 15:14:49 UTC) #8
cpu_(ooo_6.6-7.5)
no objections from me.
7 years, 4 months ago (2013-08-01 21:18:20 UTC) #9
grt (UTC plus 2)
On 2013/08/01 15:14:49, gab wrote: > ping, see below > > https://codereview.chromium.org/21150006/diff/41001/chrome/common/chrome_switches.cc > File chrome/common/chrome_switches.cc ...
7 years, 4 months ago (2013-08-02 15:56:32 UTC) #10
grt (UTC plus 2)
On 2013/07/31 00:00:51, gab wrote: > https://codereview.chromium.org/21150006/diff/41001/chrome/common/chrome_switches.cc > File chrome/common/chrome_switches.cc (left): > > https://codereview.chromium.org/21150006/diff/41001/chrome/common/chrome_switches.cc#oldcode968 > ...
7 years, 4 months ago (2013-08-02 15:58:54 UTC) #11
gab
On 2013/08/02 15:58:54, grt (no reviews Aug 3-11) wrote: > On 2013/07/31 00:00:51, gab wrote: ...
7 years, 4 months ago (2013-08-06 14:41:18 UTC) #12
gab
@jochen for OWNER on side-effects in chrome\browser\chrome_browser_main_mac.mm chrome\browser\chromeos\login\login_browsertest.cc chrome\test\nacl\nacl_browsertest_util.cc Thanks! Gab
7 years, 4 months ago (2013-08-07 15:33:13 UTC) #13
jochen (gone - plz use gerrit)
can you explain why you dropped the no first run switches from the browser test ...
7 years, 4 months ago (2013-08-08 00:55:05 UTC) #14
gab
On 2013/08/08 00:55:05, jochen wrote: > can you explain why you dropped the no first ...
7 years, 4 months ago (2013-08-08 01:29:36 UTC) #15
jochen (gone - plz use gerrit)
thanks, lgtm
7 years, 4 months ago (2013-08-08 01:32:57 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gab@chromium.org/21150006/162001
7 years, 4 months ago (2013-08-08 01:47:25 UTC) #17
commit-bot: I haz the power
7 years, 4 months ago (2013-08-08 22:20:04 UTC) #18
Message was sent while issue was closed.
Change committed as 216460

Powered by Google App Engine
This is Rietveld 408576698