summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobertshield@google.com <robertshield@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-05 20:17:25 +0000
committerrobertshield@google.com <robertshield@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-05 20:17:25 +0000
commit6cf2af2efbde465c5ce6c90bd141056ed78ba335 (patch)
treee6d5515e1fda78e9c8866ec356b525ba8a174411
parent04bd2bb5cfa7530ac4caf649310b93d9719c28d3 (diff)
downloadchromium_src-6cf2af2efbde465c5ce6c90bd141056ed78ba335.zip
chromium_src-6cf2af2efbde465c5ce6c90bd141056ed78ba335.tar.gz
chromium_src-6cf2af2efbde465c5ce6c90bd141056ed78ba335.tar.bz2
Adding first run bypass command line flag.
This allows the browser to start up without ever showing the first run UI, regardless of whether the First Run sentinel file is present. Quite useful for automated testing ;-) Review URL: http://codereview.chromium.org/99344 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15329 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/browser_main.cc5
-rw-r--r--chrome/common/chrome_switches.cc5
-rw-r--r--chrome/common/chrome_switches.h2
3 files changed, 11 insertions, 1 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 0588bf5d..a40138a 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -326,8 +326,11 @@ int BrowserMain(const MainFunctionParams& parameters) {
// If we are running in App mode, we do not want to show the importer
// (first run) UI.
- if (!first_run_ui_bypass && parsed_command_line.HasSwitch(switches::kApp))
+ if (!first_run_ui_bypass &&
+ (parsed_command_line.HasSwitch(switches::kApp) ||
+ parsed_command_line.HasSwitch(switches::kNoFirstRun))) {
first_run_ui_bypass = true;
+ }
}
if (!parsed_command_line.HasSwitch(switches::kNoErrorDialogs)) {
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 879d7b1..41bc1ae 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -297,6 +297,11 @@ const wchar_t kEnableWatchdog[] = L"enable-watchdog";
// whether or not it's actually the first run.
const wchar_t kFirstRun[] = L"first-run";
+// Bypass the First Run experience when the browser is started, regardless of
+// whether or not it's actually the first run. Overrides kFirstRun in case
+// you're for some reason tempted to pass them both.
+const wchar_t kNoFirstRun[] = L"no-first-run";
+
// Enable histograming of tasks served by MessageLoop. See about:histograms/Loop
// for results, which show frequency of messages on each thread, including APC
// count, object signalling count, etc.
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 46dd746..964aa38 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -103,6 +103,8 @@ extern const wchar_t kEnableWatchdog[];
extern const wchar_t kFirstRun[];
+extern const wchar_t kNoFirstRun[];
+
extern const wchar_t kMessageLoopHistogrammer[];
extern const wchar_t kImport[];