Refactor 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.
Review URL: https://chromiumcodereview.appspot.com/11636031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174809 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/process_singleton_browsertest.cc b/chrome/browser/process_singleton_browsertest.cc
index c0053fb..556a4bab 100644
--- a/chrome/browser/process_singleton_browsertest.cc
+++ b/chrome/browser/process_singleton_browsertest.cc
@@ -64,7 +64,7 @@
command_line.AppendSwitchPath(switches::kUserDataDir, user_data_dir_);
if (first_run)
- command_line.AppendSwitch(switches::kFirstRun);
+ command_line.AppendSwitch(switches::kForceFirstRun);
else
command_line.AppendSwitch(switches::kNoFirstRun);
@@ -77,7 +77,7 @@
i != switch_map.end(); ++i) {
const std::string& switch_name = i->first;
if (switch_name == switches::kUserDataDir ||
- switch_name == switches::kFirstRun ||
+ switch_name == switches::kForceFirstRun ||
switch_name == switches::kNoFirstRun)
continue;