diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-18 22:34:05 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-18 22:34:05 +0000 |
commit | 30bf9fd6ad27d43208f8b48a927fa713ac6bd285 (patch) | |
tree | e7f4199fb3824d2bef7195255b58ef3cb663926e /chrome/browser | |
parent | ba468d3fa72df1247532c161d7d605e056148661 (diff) | |
download | chromium_src-30bf9fd6ad27d43208f8b48a927fa713ac6bd285.zip chromium_src-30bf9fd6ad27d43208f8b48a927fa713ac6bd285.tar.gz chromium_src-30bf9fd6ad27d43208f8b48a927fa713ac6bd285.tar.bz2 |
Enable the incognito extension toggle by default. No more flag.
BUG=32365
Review URL: http://codereview.chromium.org/1075005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42013 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/dom_ui/ntp_resource_cache.cc | 5 | ||||
-rw-r--r-- | chrome/browser/extensions/browser_action_apitest.cc | 15 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_incognito_apitest.cc | 10 | ||||
-rw-r--r-- | chrome/browser/extensions/extensions_ui.cc | 4 | ||||
-rw-r--r-- | chrome/browser/resources/extensions_ui.html | 10 | ||||
-rw-r--r-- | chrome/browser/resources/incognito_tab.html | 7 | ||||
-rw-r--r-- | chrome/browser/views/browser_actions_container_unittest.cc | 6 |
7 files changed, 5 insertions, 52 deletions
diff --git a/chrome/browser/dom_ui/ntp_resource_cache.cc b/chrome/browser/dom_ui/ntp_resource_cache.cc index 5168c8c..7c0caaf 100644 --- a/chrome/browser/dom_ui/ntp_resource_cache.cc +++ b/chrome/browser/dom_ui/ntp_resource_cache.cc @@ -225,11 +225,6 @@ void NTPResourceCache::CreateNewTabIncognitoHTML() { l10n_util::GetStringF(IDS_NEW_TAB_OTR_EXTENSIONS_MESSAGE, l10n_util::GetString(IDS_PRODUCT_NAME), ASCIIToWide(chrome::kChromeUIExtensionsURL))); - bool show_extensions_disabled = - CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableExperimentalExtensionApis); - localized_strings.SetString(L"showextensionsmessage", - show_extensions_disabled ? "true" : "false"); bool bookmark_bar_attached = profile_->GetPrefs()->GetBoolean( prefs::kShowBookmarkBar); localized_strings.SetString(L"bookmarkbarattached", diff --git a/chrome/browser/extensions/browser_action_apitest.cc b/chrome/browser/extensions/browser_action_apitest.cc index 93975e7..b554fa1 100644 --- a/chrome/browser/extensions/browser_action_apitest.cc +++ b/chrome/browser/extensions/browser_action_apitest.cc @@ -46,9 +46,6 @@ class BrowserActionApiTest : public ExtensionApiTest { }; IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, Basic) { - CommandLine::ForCurrentProcess()->AppendSwitch( - switches::kEnableExperimentalExtensionApis); - StartHTTPServer(); ASSERT_TRUE(RunExtensionTest("browser_action/basics")) << message_; Extension* extension = GetSingleLoadedExtension(); @@ -148,9 +145,6 @@ IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, TabSpecificBrowserActionState) { } IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, BrowserActionPopup) { - CommandLine::ForCurrentProcess()->AppendSwitch( - switches::kEnableExperimentalExtensionApis); - ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII( "browser_action/popup"))); Extension* extension = GetSingleLoadedExtension(); @@ -184,9 +178,6 @@ IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, BrowserActionPopup) { // Test that calling chrome.browserAction.setPopup() can enable and change // a popup. IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, BrowserActionAddPopup) { - CommandLine::ForCurrentProcess()->AppendSwitch( - switches::kEnableExperimentalExtensionApis); - ASSERT_TRUE(RunExtensionTest("browser_action/add_popup")) << message_; Extension* extension = GetSingleLoadedExtension(); ASSERT_TRUE(extension) << message_; @@ -274,9 +265,6 @@ IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, BrowserActionRemovePopup) { } IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, IncognitoBasic) { - CommandLine::ForCurrentProcess()->AppendSwitch( - switches::kEnableExperimentalExtensionApis); - StartHTTPServer(); ASSERT_TRUE(RunExtensionTest("browser_action/basics")) << message_; @@ -317,9 +305,6 @@ IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, IncognitoDragging) { #endif ExtensionsService* service = browser()->profile()->GetExtensionsService(); - CommandLine::ForCurrentProcess()->AppendSwitch( - switches::kEnableExperimentalExtensionApis); - // The tooltips for each respective browser action. const char kTooltipA[] = "Make this page red"; const char kTooltipB[] = "grow"; diff --git a/chrome/browser/extensions/extension_incognito_apitest.cc b/chrome/browser/extensions/extension_incognito_apitest.cc index 29de8fb..64e3ed7 100644 --- a/chrome/browser/extensions/extension_incognito_apitest.cc +++ b/chrome/browser/extensions/extension_incognito_apitest.cc @@ -22,8 +22,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, IncognitoNoScript) { // Loads a simple extension which attempts to change the title of every page // that loads to "modified". - CommandLine::ForCurrentProcess()->AppendSwitch( - switches::kEnableExperimentalExtensionApis); ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("api_test") .AppendASCII("incognito").AppendASCII("content_scripts"))); @@ -55,8 +53,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, IncognitoYesScript) { // Loads a simple extension which attempts to change the title of every page // that loads to "modified". - CommandLine::ForCurrentProcess()->AppendSwitch( - switches::kEnableExperimentalExtensionApis); ASSERT_TRUE(LoadExtensionIncognito(test_data_dir_.AppendASCII("api_test") .AppendASCII("incognito").AppendASCII("content_scripts"))); @@ -91,8 +87,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Incognito) { ui_test_utils::OpenURLOffTheRecord(browser()->profile(), GURL("http://www.example.com:1337/files/extensions/test_file.html")); - CommandLine::ForCurrentProcess()->AppendSwitch( - switches::kEnableExperimentalExtensionApis); ASSERT_TRUE(LoadExtensionIncognito(test_data_dir_ .AppendASCII("incognito").AppendASCII("apis"))); @@ -111,8 +105,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, IncognitoDisabled) { ui_test_utils::OpenURLOffTheRecord(browser()->profile(), GURL("http://www.example.com:1337/files/extensions/test_file.html")); - CommandLine::ForCurrentProcess()->AppendSwitch( - switches::kEnableExperimentalExtensionApis); ASSERT_TRUE(LoadExtension(test_data_dir_ .AppendASCII("incognito").AppendASCII("apis_disabled"))); @@ -126,8 +118,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, IncognitoPopup) { ResultCatcher catcher; - CommandLine::ForCurrentProcess()->AppendSwitch( - switches::kEnableExperimentalExtensionApis); ASSERT_TRUE(LoadExtensionIncognito(test_data_dir_ .AppendASCII("incognito").AppendASCII("popup"))); diff --git a/chrome/browser/extensions/extensions_ui.cc b/chrome/browser/extensions/extensions_ui.cc index 7fe0e87..d45263e 100644 --- a/chrome/browser/extensions/extensions_ui.cc +++ b/chrome/browser/extensions/extensions_ui.cc @@ -328,10 +328,6 @@ void ExtensionsDOMHandler::HandleRequestExtensionsData(const Value* value) { ->GetBoolean(prefs::kExtensionsUIDeveloperMode); results->SetBoolean(L"developerMode", developer_mode); - results->SetBoolean(L"experimentalIncognito", - CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableExperimentalExtensionApis)); - if (icon_loader_.get()) icon_loader_->Cancel(); diff --git a/chrome/browser/resources/extensions_ui.html b/chrome/browser/resources/extensions_ui.html index 657c342..25e1bf6 100644 --- a/chrome/browser/resources/extensions_ui.html +++ b/chrome/browser/resources/extensions_ui.html @@ -418,9 +418,6 @@ function toggleDevModeExpanded() { chrome.send('toggleDeveloperMode', []); } -// Experimental flag that enables toggling an extension as incognito enabled. -var experimentalIncognito = false; - /** * Takes the |extensionsData| input argument which represents data about the * currently installed/running extensions and populates the html jstemplate with @@ -469,7 +466,6 @@ var rendered_once_ = false; function returnExtensionsData(extensionsData){ domui_responded_ = true; devModeExpanded = extensionsData.developerMode; - experimentalIncognito = extensionsData.experimentalIncognito; var bodyContainer = document.getElementById('body-container'); var body = document.getElementsByTagName('body')[0]; @@ -850,15 +846,15 @@ function autoUpdate() { i18n-content="options" >OPTIONS</a> <span - jsdisplay="enabled && experimentalIncognito" + jsdisplay="enabled" >|</span> <input type="checkbox" jsvalues=".extensionId:id;.enabled:enabled" - jsdisplay="enabled && experimentalIncognito" + jsdisplay="enabled" jseval="this.checked = enabledIncognito" onchange="handleToggleExtensionIncognito(this, false)" /> <label - jsdisplay="enabled && experimentalIncognito" + jsdisplay="enabled" onclick="handleToggleExtensionIncognito(this.previousSibling.previousSibling, true)" i18n-content="enableIncognito"> ALLOW THIS EXTENSION TO RUN IN INCOGNITO</label> diff --git a/chrome/browser/resources/incognito_tab.html b/chrome/browser/resources/incognito_tab.html index e0c8933..4d42c2f 100644 --- a/chrome/browser/resources/incognito_tab.html +++ b/chrome/browser/resources/incognito_tab.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html i18n-values="dir:textdirection;bookmarkbarattached:bookmarkbarattached;showextensionsmessage:showextensionsmessage"> +<html i18n-values="dir:textdirection;bookmarkbarattached:bookmarkbarattached"> <head> <title i18n-content="title"></title> <style> @@ -25,7 +25,7 @@ html[dir="rtl"] .icon { margin-right:auto; margin-top:66px; } -html[showextensionsmessage="true"] .extensionsmessage { +.extensionsmessage { color:black; padding:10px 10px 10px 10px; max-width:600px; @@ -33,9 +33,6 @@ html[showextensionsmessage="true"] .extensionsmessage { margin-right:auto; margin-top:5px; } -html[showextensionsmessage="false"] .extensionsmessage { - display:none; -} .extensionicon { float:left; margin:10px 5px 0 0px; diff --git a/chrome/browser/views/browser_actions_container_unittest.cc b/chrome/browser/views/browser_actions_container_unittest.cc index c8a4c72..8a8cc02 100644 --- a/chrome/browser/views/browser_actions_container_unittest.cc +++ b/chrome/browser/views/browser_actions_container_unittest.cc @@ -39,9 +39,6 @@ class BrowserActionsContainerTest : public ExtensionBrowserTest { // Test the basic functionality. IN_PROC_BROWSER_TEST_F(BrowserActionsContainerTest, Basic) { - CommandLine::ForCurrentProcess()->AppendSwitch( - switches::kEnableExperimentalExtensionApis); - BrowserActionsContainer::disable_animations_during_testing_ = true; // Load an extension with no browser action. @@ -65,9 +62,6 @@ IN_PROC_BROWSER_TEST_F(BrowserActionsContainerTest, Basic) { } IN_PROC_BROWSER_TEST_F(BrowserActionsContainerTest, Visibility) { - CommandLine::ForCurrentProcess()->AppendSwitch( - switches::kEnableExperimentalExtensionApis); - BrowserActionsContainer::disable_animations_during_testing_ = true; // Load extension A (contains browser action). |