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

Side by Side Diff: chrome/browser/dom_ui/options/advanced_options_handler.cc

Issue 6240013: Make proxy settings one atomic dictionary in the PrefStores such that modifications are atomic. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/out/Debug
Patch Set: Fixed Lint comment Created 9 years, 10 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 | chrome/browser/extensions/extension_proxy_api.h » ('j') | 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) 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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 bool disabled = !(manager && manager->download_prefs()->IsAutoOpenUsed()); 577 bool disabled = !(manager && manager->download_prefs()->IsAutoOpenUsed());
578 FundamentalValue value(disabled); 578 FundamentalValue value(disabled);
579 dom_ui_->CallJavascriptFunction( 579 dom_ui_->CallJavascriptFunction(
580 L"options.AdvancedOptions.SetAutoOpenFileTypesDisabledAttribute", value); 580 L"options.AdvancedOptions.SetAutoOpenFileTypesDisabledAttribute", value);
581 } 581 }
582 582
583 void AdvancedOptionsHandler::SetupProxySettingsSection() { 583 void AdvancedOptionsHandler::SetupProxySettingsSection() {
584 // Disable the button if proxy settings are managed by a sysadmin or 584 // Disable the button if proxy settings are managed by a sysadmin or
585 // overridden by an extension. 585 // overridden by an extension.
586 PrefService* pref_service = dom_ui_->GetProfile()->GetPrefs(); 586 PrefService* pref_service = dom_ui_->GetProfile()->GetPrefs();
587 const PrefService::Preference* proxy_server = 587 const PrefService::Preference* proxy_config =
588 pref_service->FindPreference(prefs::kProxyServer); 588 pref_service->FindPreference(prefs::kProxy);
589 bool is_extension_controlled = (proxy_server && 589 bool is_extension_controlled = (proxy_config &&
590 proxy_server->IsExtensionControlled()); 590 proxy_config->IsExtensionControlled());
591 591
592 FundamentalValue disabled(proxy_prefs_->IsManaged() || 592 FundamentalValue disabled(proxy_prefs_->IsManaged() ||
593 is_extension_controlled); 593 is_extension_controlled);
594 594
595 // Get the appropriate info string to describe the button. 595 // Get the appropriate info string to describe the button.
596 string16 label_str; 596 string16 label_str;
597 if (is_extension_controlled) { 597 if (is_extension_controlled) {
598 label_str = l10n_util::GetStringUTF16(IDS_OPTIONS_EXTENSION_PROXIES_LABEL); 598 label_str = l10n_util::GetStringUTF16(IDS_OPTIONS_EXTENSION_PROXIES_LABEL);
599 } else { 599 } else {
600 label_str = l10n_util::GetStringFUTF16(IDS_OPTIONS_SYSTEM_PROXIES_LABEL, 600 label_str = l10n_util::GetStringFUTF16(IDS_OPTIONS_SYSTEM_PROXIES_LABEL,
(...skipping 28 matching lines...) Expand all
629 FundamentalValue useSSL3Value(useSSL3Setting); 629 FundamentalValue useSSL3Value(useSSL3Setting);
630 dom_ui_->CallJavascriptFunction( 630 dom_ui_->CallJavascriptFunction(
631 L"options.AdvancedOptions.SetUseSSL3CheckboxState", 631 L"options.AdvancedOptions.SetUseSSL3CheckboxState",
632 useSSL3Value, disabledValue); 632 useSSL3Value, disabledValue);
633 FundamentalValue useTLS1Value(useTLS1Setting); 633 FundamentalValue useTLS1Value(useTLS1Setting);
634 dom_ui_->CallJavascriptFunction( 634 dom_ui_->CallJavascriptFunction(
635 L"options.AdvancedOptions.SetUseTLS1CheckboxState", 635 L"options.AdvancedOptions.SetUseTLS1CheckboxState",
636 useTLS1Value, disabledValue); 636 useTLS1Value, disabledValue);
637 } 637 }
638 #endif 638 #endif
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_proxy_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698