| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/dom_ui/options/advanced_options_handler.h" | 5 #include "chrome/browser/dom_ui/options/advanced_options_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 bool disabled = !(manager && manager->download_prefs()->IsAutoOpenUsed()); | 568 bool disabled = !(manager && manager->download_prefs()->IsAutoOpenUsed()); |
| 569 FundamentalValue value(disabled); | 569 FundamentalValue value(disabled); |
| 570 dom_ui_->CallJavascriptFunction( | 570 dom_ui_->CallJavascriptFunction( |
| 571 L"options.AdvancedOptions.SetAutoOpenFileTypesDisabledAttribute", value); | 571 L"options.AdvancedOptions.SetAutoOpenFileTypesDisabledAttribute", value); |
| 572 } | 572 } |
| 573 | 573 |
| 574 void AdvancedOptionsHandler::SetupProxySettingsSection() { | 574 void AdvancedOptionsHandler::SetupProxySettingsSection() { |
| 575 // Disable the button if proxy settings are managed by a sysadmin or | 575 // Disable the button if proxy settings are managed by a sysadmin or |
| 576 // overridden by an extension. | 576 // overridden by an extension. |
| 577 PrefService* pref_service = dom_ui_->GetProfile()->GetPrefs(); | 577 PrefService* pref_service = dom_ui_->GetProfile()->GetPrefs(); |
| 578 const PrefService::Preference* proxy_server = | 578 const PrefService::Preference* proxy_config = |
| 579 pref_service->FindPreference(prefs::kProxyServer); | 579 pref_service->FindPreference(prefs::kProxy); |
| 580 bool is_extension_controlled = (proxy_server && | 580 bool is_extension_controlled = (proxy_config && |
| 581 proxy_server->IsExtensionControlled()); | 581 proxy_config->IsExtensionControlled()); |
| 582 | 582 |
| 583 FundamentalValue disabled(proxy_prefs_->IsManaged() || | 583 FundamentalValue disabled(proxy_prefs_->IsManaged() || |
| 584 is_extension_controlled); | 584 is_extension_controlled); |
| 585 | 585 |
| 586 // Get the appropriate info string to describe the button. | 586 // Get the appropriate info string to describe the button. |
| 587 string16 label_str; | 587 string16 label_str; |
| 588 if (is_extension_controlled) { | 588 if (is_extension_controlled) { |
| 589 label_str = l10n_util::GetStringUTF16(IDS_OPTIONS_EXTENSION_PROXIES_LABEL); | 589 label_str = l10n_util::GetStringUTF16(IDS_OPTIONS_EXTENSION_PROXIES_LABEL); |
| 590 } else { | 590 } else { |
| 591 label_str = l10n_util::GetStringFUTF16(IDS_OPTIONS_SYSTEM_PROXIES_LABEL, | 591 label_str = l10n_util::GetStringFUTF16(IDS_OPTIONS_SYSTEM_PROXIES_LABEL, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 620 FundamentalValue useSSL3Value(useSSL3Setting); | 620 FundamentalValue useSSL3Value(useSSL3Setting); |
| 621 dom_ui_->CallJavascriptFunction( | 621 dom_ui_->CallJavascriptFunction( |
| 622 L"options.AdvancedOptions.SetUseSSL3CheckboxState", | 622 L"options.AdvancedOptions.SetUseSSL3CheckboxState", |
| 623 useSSL3Value, disabledValue); | 623 useSSL3Value, disabledValue); |
| 624 FundamentalValue useTLS1Value(useTLS1Setting); | 624 FundamentalValue useTLS1Value(useTLS1Setting); |
| 625 dom_ui_->CallJavascriptFunction( | 625 dom_ui_->CallJavascriptFunction( |
| 626 L"options.AdvancedOptions.SetUseTLS1CheckboxState", | 626 L"options.AdvancedOptions.SetUseTLS1CheckboxState", |
| 627 useTLS1Value, disabledValue); | 627 useTLS1Value, disabledValue); |
| 628 } | 628 } |
| 629 #endif | 629 #endif |
| OLD | NEW |