summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui
diff options
context:
space:
mode:
authorarv@google.com <arv@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-28 17:23:06 +0000
committerarv@google.com <arv@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-28 17:23:06 +0000
commit419247b22a41448a297f65cd697d7ef15f873e33 (patch)
tree1ef735bfa6542a70113e63bdd0d43823c83619b3 /chrome/browser/dom_ui
parent4c05473207a61a7f776062c5fec0900f821e8e45 (diff)
downloadchromium_src-419247b22a41448a297f65cd697d7ef15f873e33.zip
chromium_src-419247b22a41448a297f65cd697d7ef15f873e33.tar.gz
chromium_src-419247b22a41448a297f65cd697d7ef15f873e33.tar.bz2
Disable first run for the New Tab Cold perf test.
BUG=17668 TEST=Run the test Review URL: http://codereview.chromium.org/160108 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21854 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.cc9
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.h6
2 files changed, 14 insertions, 1 deletions
diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc
index deb9683..5ccd3fe 100644
--- a/chrome/browser/dom_ui/new_tab_ui.cc
+++ b/chrome/browser/dom_ui/new_tab_ui.cc
@@ -1498,6 +1498,9 @@ NewTabUI::NewTabUI(TabContents* contents)
NewTabHTMLSource::set_first_view(false);
}
+ if (NewTabUI::FirstRunDisabled())
+ NewTabHTMLSource::set_first_run(false);
+
tab_contents()->render_view_host()->set_paint_observer(new PaintTimer);
if (GetProfile()->IsOffTheRecord()) {
@@ -1599,3 +1602,9 @@ bool NewTabUI::WebResourcesEnabled() {
const CommandLine* command_line = CommandLine::ForCurrentProcess();
return command_line->HasSwitch(switches::kEnableWebResources);
}
+
+// static
+bool NewTabUI::FirstRunDisabled() {
+ const CommandLine* command_line = CommandLine::ForCurrentProcess();
+ return command_line->HasSwitch(switches::kDisableNewTabFirstRun);
+}
diff --git a/chrome/browser/dom_ui/new_tab_ui.h b/chrome/browser/dom_ui/new_tab_ui.h
index fde0fe2..07f27ca 100644
--- a/chrome/browser/dom_ui/new_tab_ui.h
+++ b/chrome/browser/dom_ui/new_tab_ui.h
@@ -31,7 +31,11 @@ class NewTabUI : public DOMUI,
// Whether we should disable the web resources backend service
static bool WebResourcesEnabled();
- private:
+ // Whether we should disable the first run notification based on the command
+ // line switch.
+ static bool FirstRunDisabled();
+
+private:
void Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details);