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 | |
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')
-rw-r--r-- | chrome/browser/about_flags.cc | 7 | ||||
-rw-r--r-- | chrome/browser/app_controller_mac.mm | 2 | ||||
-rw-r--r-- | chrome/browser/chromeos/login/login_utils.cc | 1 | ||||
-rw-r--r-- | chrome/browser/chromeos/status/network_menu.cc | 4 | ||||
-rw-r--r-- | chrome/browser/dom_ui/dom_ui_factory.cc | 4 | ||||
-rw-r--r-- | chrome/browser/dom_ui/options/options_ui_uitest.cc | 2 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_view_host.cc | 4 | ||||
-rw-r--r-- | chrome/browser/ui/browser.cc | 36 | ||||
-rw-r--r-- | chrome/browser/ui/browser_navigator_browsertest.cc | 9 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 6 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 2 |
11 files changed, 31 insertions, 46 deletions
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index a37f7a3..69b7a4e 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc @@ -122,13 +122,6 @@ const Experiment kExperiments[] = { SINGLE_VALUE_TYPE(switches::kEnableVerticalTabs) }, { - "tabbed-options", // FLAGS:RECORD_UMA - IDS_FLAGS_TABBED_OPTIONS_NAME, - IDS_FLAGS_TABBED_OPTIONS_DESCRIPTION, - kOsWin | kOsLinux | kOsMac, // Enabled by default on CrOS. - SINGLE_VALUE_TYPE(switches::kEnableTabbedOptions) - }, - { "remoting", // FLAGS:RECORD_UMA IDS_FLAGS_REMOTING_NAME, #if defined(OS_WIN) diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm index 2156f19..79579fe 100644 --- a/chrome/browser/app_controller_mac.mm +++ b/chrome/browser/app_controller_mac.mm @@ -1120,7 +1120,7 @@ void RecordLastRunAppBundlePath() { // visible. - (IBAction)showPreferences:(id)sender { const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); - if (parsed_command_line.HasSwitch(switches::kEnableTabbedOptions)) { + if (!parsed_command_line.HasSwitch(switches::kDisableTabbedOptions)) { if (Browser* browser = ActivateBrowser([self defaultProfile])) { // Show options tab in the active browser window. browser->ShowOptionsTab(chrome::kDefaultOptionsSubPage); diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc index 82d8e13..708f2e4 100644 --- a/chrome/browser/chromeos/login/login_utils.cc +++ b/chrome/browser/chromeos/login/login_utils.cc @@ -366,7 +366,6 @@ void LoginUtilsImpl::CompleteOffTheRecordLogin(const GURL& start_url) { switches::kEnableGView, switches::kNoFirstRun, switches::kLoginProfile, - switches::kEnableTabbedOptions, switches::kCompressSystemFeedback, switches::kDisableSeccompSandbox, #if defined(HAVE_XINPUT2) diff --git a/chrome/browser/chromeos/status/network_menu.cc b/chrome/browser/chromeos/status/network_menu.cc index 9d206cd..c09594d 100644 --- a/chrome/browser/chromeos/status/network_menu.cc +++ b/chrome/browser/chromeos/status/network_menu.cc @@ -82,8 +82,8 @@ const int NetworkMenu::kBarsImagesVLowData[kNumBarsImages] = { NetworkMenu::NetworkMenu() : min_width_(-1) { - use_settings_ui_ = CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableTabbedOptions); + use_settings_ui_ = !CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableTabbedOptions); network_menu_.reset(NetworkMenuUI::CreateMenu2(this)); } diff --git a/chrome/browser/dom_ui/dom_ui_factory.cc b/chrome/browser/dom_ui/dom_ui_factory.cc index 6f7eaaf..c72d056 100644 --- a/chrome/browser/dom_ui/dom_ui_factory.cc +++ b/chrome/browser/dom_ui/dom_ui_factory.cc @@ -200,8 +200,8 @@ static DOMUIFactoryFunction GetDOMUIFactoryFunction(Profile* profile, return &NewDOMUI<chromeos::NetworkMenuUI>; #else if (url.host() == chrome::kChromeUISettingsHost) { - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableTabbedOptions)) { + if (!CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableTabbedOptions)) { return &NewDOMUI<OptionsUI>; } } diff --git a/chrome/browser/dom_ui/options/options_ui_uitest.cc b/chrome/browser/dom_ui/options/options_ui_uitest.cc index 6abad48..b6c8bd2 100644 --- a/chrome/browser/dom_ui/options/options_ui_uitest.cc +++ b/chrome/browser/dom_ui/options/options_ui_uitest.cc @@ -23,8 +23,6 @@ class OptionsUITest : public UITest { public: OptionsUITest() { dom_automation_enabled_ = true; - // TODO(csilv): Remove when dom-ui options is enabled by default. - launch_arguments_.AppendSwitch(switches::kEnableTabbedOptions); } void AssertIsOptionsPage(TabProxy* tab) { diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc index 12eb0c5..ccbd57a 100644 --- a/chrome/browser/renderer_host/render_view_host.cc +++ b/chrome/browser/renderer_host/render_view_host.cc @@ -1640,8 +1640,8 @@ void RenderViewHost::OnRemoveAutocompleteEntry(const string16& field_name, } void RenderViewHost::OnShowAutoFillDialog() { - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableTabbedOptions)) { + if (!CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableTabbedOptions)) { Browser* browser = BrowserList::GetLastActive(); if (!browser) return; 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/"); diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 5f250e6..692132a 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -350,6 +350,9 @@ const char kDisableSyncThemes[] = "disable-sync-themes"; const char kEnableSyncNewAutofill[] = "enable-sync-new-autofill-data-type"; +// Disable tabbed options, i.e., DOMUI version of options window. +const char kDisableTabbedOptions[] = "disable-tabbed-options"; + // TabCloseableStateWatcher disallows closing of tabs and browsers under certain // situations on ChromeOS. Some tests expect tabs or browsers to close, so we // need a switch to disable the watcher. @@ -566,9 +569,6 @@ const char kEnableSyncSessions[] = "enable-sync-sessions"; // Enable syncing browser typed urls. const char kEnableSyncTypedUrls[] = "enable-sync-typed-urls"; -// Enable tabbed options, ie: dom-ui version of options window. -const char kEnableTabbedOptions[] = "enable-tabbed-options"; - // Enable use of experimental TCP sockets API for sending data in the // SYN packet. const char kEnableTcpFastOpen[] = "enable-tcp-fastopen"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index e54b3a6..f0b14bd 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -108,6 +108,7 @@ extern const char kDisableSyncBookmarks[]; extern const char kDisableSyncExtensions[]; extern const char kDisableSyncPreferences[]; extern const char kDisableSyncThemes[]; +extern const char kDisableTabbedOptions[]; extern const char kDisableTabCloseableStateWatcher[]; extern const char kDisableTranslate[]; extern const char kDisableWebResources[]; @@ -169,7 +170,6 @@ extern const char kEnableSyncPasswords[]; extern const char kEnableSyncPreferences[]; extern const char kEnableSyncSessions[]; extern const char kEnableSyncTypedUrls[]; -extern const char kEnableTabbedOptions[]; extern const char kEnableTcpFastOpen[]; extern const char kEnableTopSites[]; extern const char kEnableTouch[]; |