diff options
author | gab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-02 17:52:38 +0000 |
---|---|---|
committer | gab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-02 17:52:38 +0000 |
commit | 3f002a386bfa32f34479d9eb22531120d51394e5 (patch) | |
tree | 2e632cdaf3eeabc75c7183817b23d0d8841d87de /chrome/common/switch_utils_unittest.cc | |
parent | e82b2bd016395079f0f9c8080d3499dc9bccd347 (diff) | |
download | chromium_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/common/switch_utils_unittest.cc')
-rw-r--r-- | chrome/common/switch_utils_unittest.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/common/switch_utils_unittest.cc b/chrome/common/switch_utils_unittest.cc index 74bc8af..b522d91 100644 --- a/chrome/common/switch_utils_unittest.cc +++ b/chrome/common/switch_utils_unittest.cc @@ -13,7 +13,7 @@ TEST(SwitchUtilsTest, RemoveSwitches) { const CommandLine::CharType* argv[] = { FILE_PATH_LITERAL("program"), FILE_PATH_LITERAL("--app=http://www.google.com/"), - FILE_PATH_LITERAL("--first-run"), + FILE_PATH_LITERAL("--force-first-run"), FILE_PATH_LITERAL("--import"), FILE_PATH_LITERAL("--import-from-file=c:\\test.html"), FILE_PATH_LITERAL("--make-default-browser"), @@ -39,7 +39,7 @@ TEST(SwitchUtilsTest, RemoveSwitchesFromString) { CommandLine cmd_line = CommandLine::FromString( L"program" L" --app=http://www.google.com/" - L" --first-run" + L" --force-first-run" L" --import" L" --import-from-file=c:\\test.html" L" --make-default-browser" |