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

Side by Side Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 17408009: Fix bug preventing supervised users from changing proxy settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/options/browser_options_handler.h" 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after
1721 void BrowserOptionsHandler::SetupProxySettingsSection() { 1721 void BrowserOptionsHandler::SetupProxySettingsSection() {
1722 #if !defined(OS_CHROMEOS) 1722 #if !defined(OS_CHROMEOS)
1723 // Disable the button if proxy settings are managed by a sysadmin or 1723 // Disable the button if proxy settings are managed by a sysadmin or
1724 // overridden by an extension. 1724 // overridden by an extension.
1725 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); 1725 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
1726 const PrefService::Preference* proxy_config = 1726 const PrefService::Preference* proxy_config =
1727 pref_service->FindPreference(prefs::kProxy); 1727 pref_service->FindPreference(prefs::kProxy);
1728 bool is_extension_controlled = (proxy_config && 1728 bool is_extension_controlled = (proxy_config &&
1729 proxy_config->IsExtensionControlled()); 1729 proxy_config->IsExtensionControlled());
1730 1730
1731 base::FundamentalValue disabled(profile_pref_registrar_.IsManaged() || 1731 base::FundamentalValue disabled(!proxy_config->IsUserModifiable());
1732 is_extension_controlled);
1733 base::FundamentalValue extension_controlled(is_extension_controlled); 1732 base::FundamentalValue extension_controlled(is_extension_controlled);
1734 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection", 1733 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection",
1735 disabled, extension_controlled); 1734 disabled, extension_controlled);
1736 1735
1737 #endif // !defined(OS_CHROMEOS) 1736 #endif // !defined(OS_CHROMEOS)
1738 } 1737 }
1739 1738
1740 } // namespace options 1739 } // namespace options
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698