diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-07 22:54:00 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-07 22:54:00 +0000 |
commit | 67ed83e65dee0e16daf5628748d272a8803eeefd (patch) | |
tree | c300c9f3641ac9529fdef69223e7a8efa0b15041 /chrome/browser/ui | |
parent | 7d34040372aacc714b5958b6251fdfe1446e5cce (diff) | |
download | chromium_src-67ed83e65dee0e16daf5628748d272a8803eeefd.zip chromium_src-67ed83e65dee0e16daf5628748d272a8803eeefd.tar.gz chromium_src-67ed83e65dee0e16daf5628748d272a8803eeefd.tar.bz2 |
Flags: Enable Tabbed Options by default.
BUG=59972
TEST=none
Review URL: http://codereview.chromium.org/6177002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70796 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui')
-rw-r--r-- | chrome/browser/ui/browser.cc | 36 | ||||
-rw-r--r-- | chrome/browser/ui/browser_navigator_browsertest.cc | 9 |
2 files changed, 20 insertions, 25 deletions
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index 6ee459b..cdaf933 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -1790,8 +1790,8 @@ void Browser::ShowOptionsTab(const std::string& sub_page) { void Browser::OpenClearBrowsingDataDialog() { UserMetrics::RecordAction(UserMetricsAction("ClearBrowsingData_ShowDlg"), profile_); - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableTabbedOptions)) { + if (!CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableTabbedOptions)) { ShowOptionsTab( chrome::kAdvancedOptionsSubPage + std::string(kHashMark) + chrome::kClearBrowserDataSubPage); @@ -1802,8 +1802,8 @@ void Browser::OpenClearBrowsingDataDialog() { void Browser::OpenOptionsDialog() { UserMetrics::RecordAction(UserMetricsAction("ShowOptions"), profile_); - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableTabbedOptions)) { + if (!CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableTabbedOptions)) { ShowOptionsTab(chrome::kDefaultOptionsSubPage); } else { ShowOptionsWindow(OPTIONS_PAGE_DEFAULT, OPTIONS_GROUP_NONE, profile_); @@ -1812,8 +1812,8 @@ void Browser::OpenOptionsDialog() { void Browser::OpenKeywordEditor() { UserMetrics::RecordAction(UserMetricsAction("EditSearchEngines"), profile_); - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableTabbedOptions)) { + if (!CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableTabbedOptions)) { ShowOptionsTab(chrome::kSearchEnginesSubPage); } else { window_->ShowSearchEnginesDialog(); @@ -1826,8 +1826,8 @@ void Browser::OpenPasswordManager() { void Browser::OpenImportSettingsDialog() { UserMetrics::RecordAction(UserMetricsAction("Import_ShowDlg"), profile_); - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableTabbedOptions)) { + if (!CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableTabbedOptions)) { ShowOptionsTab( chrome::kPersonalOptionsSubPage + std::string(kHashMark) + chrome::kImportDataSubPage); @@ -1883,8 +1883,8 @@ void Browser::OpenAutoFillHelpTabAndActivate() { } void Browser::OpenSearchEngineOptionsDialog() { - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableTabbedOptions)) { + if (!CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableTabbedOptions)) { OpenKeywordEditor(); } else { ShowOptionsWindow(OPTIONS_PAGE_GENERAL, OPTIONS_GROUP_DEFAULT_SEARCH, @@ -1896,8 +1896,8 @@ void Browser::OpenSearchEngineOptionsDialog() { void Browser::OpenSystemOptionsDialog() { UserMetrics::RecordAction(UserMetricsAction("OpenSystemOptionsDialog"), profile_); - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableTabbedOptions)) { + if (!CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableTabbedOptions)) { ShowOptionsTab(chrome::kSystemOptionsSubPage); } else { ShowOptionsWindow(OPTIONS_PAGE_SYSTEM, OPTIONS_GROUP_NONE, @@ -1908,8 +1908,8 @@ void Browser::OpenSystemOptionsDialog() { void Browser::OpenInternetOptionsDialog() { UserMetrics::RecordAction(UserMetricsAction("OpenInternetOptionsDialog"), profile_); - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableTabbedOptions)) { + if (!CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableTabbedOptions)) { ShowOptionsTab(chrome::kInternetOptionsSubPage); } else { ShowOptionsWindow(OPTIONS_PAGE_INTERNET, OPTIONS_GROUP_DEFAULT_SEARCH, @@ -1920,8 +1920,8 @@ void Browser::OpenInternetOptionsDialog() { void Browser::OpenLanguageOptionsDialog() { UserMetrics::RecordAction(UserMetricsAction("OpenLanguageOptionsDialog"), profile_); - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableTabbedOptions)) { + if (!CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableTabbedOptions)) { ShowOptionsTab(chrome::kLanguageOptionsSubPage); } else { chromeos::LanguageConfigView::Show(profile_, NULL); @@ -3112,8 +3112,8 @@ void Browser::ShowRepostFormWarningDialog(TabContents *tab_contents) { } void Browser::ShowContentSettingsWindow(ContentSettingsType content_type) { - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableTabbedOptions)) { + if (!CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableTabbedOptions)) { ShowOptionsTab( chrome::kContentSettingsSubPage + std::string(kHashMark) + ContentSettingsHandler::ContentSettingsTypeToGroupName(content_type)); diff --git a/chrome/browser/ui/browser_navigator_browsertest.cc b/chrome/browser/ui/browser_navigator_browsertest.cc index 37bb0de..a5a2291 100644 --- a/chrome/browser/ui/browser_navigator_browsertest.cc +++ b/chrome/browser/ui/browser_navigator_browsertest.cc @@ -63,11 +63,6 @@ class BrowserNavigatorTest : public InProcessBrowserTest, EXPECT_EQ(old_url, browser()->GetSelectedTabContents()->GetURL()); } - // TODO(jhawkins): Remove once tabbed options are enabled by default. - virtual void SetUpCommandLine(CommandLine* command_line) { - command_line->AppendSwitch(switches::kEnableTabbedOptions); - } - void Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { switch (type.value) { @@ -509,8 +504,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, NullBrowser_NewWindow) { } // This test verifies that constructing params with disposition = SINGLETON_TAB -// and |ignore_paths| = true opens a new tab navigated to the specified URL if no -// previous tab with that URL (minus the path) exists. +// and |ignore_paths| = true opens a new tab navigated to the specified URL if +// no previous tab with that URL (minus the path) exists. IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, Disposition_SingletonTabNew_IgnorePath) { GURL url("http://www.google.com/"); |