DescriptionRefactor first_run, very few things should depend on whether the First Run sentinel itself was present... (i.e. most tasks should not be on if flags such as --no-first-run are present).
This is a prerequisite for issue 165048 as we want to be able to launch Chrome with --no-first-run and have two guarantees:
1) No first run tasks happen
2) First Run sentinel is set so that first run never happens for this new Chrome.
This also removes PreInteractiveFirstRunInit() and PostInteractiveFirstRunInit() from BrowserMainParts as I just realized AutoImport is now silent and it is thus no longer necessary to split this in two :)! Moved everything to first_run::PostImportTasks().
This CL also buffs --first-run to --force-first-run (to be more explicit); --first-run now overrides --no-first-run as far as first run tasks are concerned (i.e. as far as everything first run related is concerned; except code that specifically looks for --no-first-run on the command line) -- kNoFirstRun used to state it would override kFirstRun, but that wasn't true anyways ans it makes more sense/is more useful the other way around.
Now a browser test may specify --force-first-run and get the full first run experience even if the underlying test harness specifies --no-first-run for all tests :).
--no-first-run is otherwise unaffected (i.e. same behavior as before) if --force-first-run is not present
BUG=165048
TEST=
1) Run chrome.exe --force-first-run from build output and see First Run flow although First Run beacon is present.
2) Delete "First Run" beacon and ensure that chrome.exe --no-first-run both skips the first run and creates the beacon.
3) Ensure that chrome.exe --force-first-run --no-first-run acts the same as chrome.exe --force-first-run.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=174809
Patch Set 1 #Patch Set 2 : fix compile #Patch Set 3 : fix posix compile #Patch Set 4 : fix android and chromeos compile #
Total comments: 6
Patch Set 5 : actually call DoPostImportPlatformSpecificTasks()... #Patch Set 6 : merge up to r174446 #
Total comments: 8
Patch Set 7 : tweaks #Patch Set 8 : +comment #
Total comments: 2
Patch Set 9 : refactor some more #Patch Set 10 : merge up to r174686 #Patch Set 11 : --first-run => --force-first-run #
Total comments: 6
Patch Set 12 : restructured and clarified comments #Patch Set 13 : fix typo #Patch Set 14 : No first run import test on OS_CHROMEOS. #Messages
Total messages: 22 (0 generated)
|