summaryrefslogtreecommitdiffstats
path: root/chrome/browser/process_singleton_browsertest.cc
diff options
context:
space:
mode:
authorgab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-02 17:52:38 +0000
committergab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-02 17:52:38 +0000
commit3f002a386bfa32f34479d9eb22531120d51394e5 (patch)
tree2e632cdaf3eeabc75c7183817b23d0d8841d87de /chrome/browser/process_singleton_browsertest.cc
parente82b2bd016395079f0f9c8080d3499dc9bccd347 (diff)
downloadchromium_src-3f002a386bfa32f34479d9eb22531120d51394e5.zip
chromium_src-3f002a386bfa32f34479d9eb22531120d51394e5.tar.gz
chromium_src-3f002a386bfa32f34479d9eb22531120d51394e5.tar.bz2
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
Diffstat (limited to 'chrome/browser/process_singleton_browsertest.cc')
-rw-r--r--chrome/browser/process_singleton_browsertest.cc4
1 files changed, 2 insertions, 2 deletions
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 @@ class ChromeStarter : public base::RefCountedThreadSafe<ChromeStarter> {
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 @@ class ChromeStarter : public base::RefCountedThreadSafe<ChromeStarter> {
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;