Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Unified Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 288923004: Add an extension override bubble and warning box for proxy extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/toolbar/browser_action_view.cc ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/browser_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc
index a12487eebdf7c2e57a4e762e74d7b4a17a5d1f12..04464575bfb1e7a236370c0f6a087c52c0cbb376 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -309,6 +309,7 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
{ "sectionTitleAppearance", IDS_APPEARANCE_GROUP_NAME },
{ "sectionTitleDefaultBrowser", IDS_OPTIONS_DEFAULTBROWSER_GROUP_NAME },
{ "sectionTitleUsers", IDS_PROFILES_OPTIONS_GROUP_NAME },
+ { "sectionTitleProxy", IDS_OPTIONS_PROXY_GROUP_NAME },
{ "sectionTitleSearch", IDS_OPTIONS_DEFAULTSEARCH_GROUP_NAME },
{ "sectionTitleStartup", IDS_OPTIONS_STARTUP_GROUP_NAME },
{ "sectionTitleSync", IDS_SYNC_OPTIONS_GROUP_NAME },
@@ -1707,9 +1708,13 @@ void BrowserOptionsHandler::SetupProxySettingsSection() {
base::FundamentalValue disabled(is_win_ash || (proxy_config &&
!proxy_config->IsUserModifiable()));
base::FundamentalValue extension_controlled(is_extension_controlled);
- web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection",
+ web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsButton",
disabled, extension_controlled);
+#if defined(OS_WIN)
+ SetupExtensionControlledIndicators();
+#endif // defined(OS_WIN)
+
#endif // !defined(OS_CHROMEOS)
}
@@ -1749,16 +1754,18 @@ void BrowserOptionsHandler::SetupExtensionControlledIndicators() {
base::DictionaryValue extension_controlled;
// Check if an extension is overriding the Search Engine.
- const extensions::Extension* extension = extensions::OverridesSearchEngine(
- Profile::FromWebUI(web_ui()), NULL);
+ const extensions::Extension* extension =
+ extensions::GetExtensionOverridingSearchEngine(
+ Profile::FromWebUI(web_ui()), NULL);
AppendExtensionData("searchEngine", extension, &extension_controlled);
// Check if an extension is overriding the Home page.
- extension = extensions::OverridesHomepage(Profile::FromWebUI(web_ui()), NULL);
+ extension = extensions::GetExtensionOverridingHomepage(
+ Profile::FromWebUI(web_ui()), NULL);
AppendExtensionData("homePage", extension, &extension_controlled);
// Check if an extension is overriding the Startup pages.
- extension = extensions::OverridesStartupPages(
+ extension = extensions::GetExtensionOverridingStartupPages(
Profile::FromWebUI(web_ui()), NULL);
AppendExtensionData("startUpPage", extension, &extension_controlled);
@@ -1779,6 +1786,11 @@ void BrowserOptionsHandler::SetupExtensionControlledIndicators() {
}
AppendExtensionData("newTabPage", extension, &extension_controlled);
+ // Check if an extension is overwriting the proxy setting.
+ extension = extensions::GetExtensionOverridingProxy(
+ Profile::FromWebUI(web_ui()));
+ AppendExtensionData("proxy", extension, &extension_controlled);
+
web_ui()->CallJavascriptFunction("BrowserOptions.toggleExtensionIndicators",
extension_controlled);
#endif // defined(OS_WIN)
« no previous file with comments | « chrome/browser/ui/views/toolbar/browser_action_view.cc ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698