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

Side by Side Diff: chrome/browser/policy/managed_prefs_banner_base.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: Updated to ToT and addressed Matt's comments in base-CL 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
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/policy/managed_prefs_banner_base.h" 5 #include "chrome/browser/policy/managed_prefs_banner_base.h"
6 6
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/prefs/pref_service.h" 8 #include "chrome/browser/prefs/pref_service.h"
9 #include "chrome/browser/prefs/pref_set_observer.h" 9 #include "chrome/browser/prefs/pref_set_observer.h"
10 #include "chrome/common/notification_details.h" 10 #include "chrome/common/notification_details.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 break; 79 break;
80 case OPTIONS_PAGE_ADVANCED: 80 case OPTIONS_PAGE_ADVANCED:
81 AddUserPref(prefs::kAlternateErrorPagesEnabled); 81 AddUserPref(prefs::kAlternateErrorPagesEnabled);
82 AddUserPref(prefs::kSearchSuggestEnabled); 82 AddUserPref(prefs::kSearchSuggestEnabled);
83 AddUserPref(prefs::kDnsPrefetchingEnabled); 83 AddUserPref(prefs::kDnsPrefetchingEnabled);
84 AddUserPref(prefs::kDisableSpdy); 84 AddUserPref(prefs::kDisableSpdy);
85 AddUserPref(prefs::kSafeBrowsingEnabled); 85 AddUserPref(prefs::kSafeBrowsingEnabled);
86 #if defined(GOOGLE_CHROME_BUILD) 86 #if defined(GOOGLE_CHROME_BUILD)
87 AddLocalStatePref(prefs::kMetricsReportingEnabled); 87 AddLocalStatePref(prefs::kMetricsReportingEnabled);
88 #endif 88 #endif
89 AddUserPref(prefs::kProxyMode); 89 AddUserPref(prefs::kProxy);
90 AddUserPref(prefs::kProxyServer);
91 AddUserPref(prefs::kProxyPacUrl);
92 AddUserPref(prefs::kProxyBypassList);
93 break; 90 break;
94 default: 91 default:
95 NOTREACHED(); 92 NOTREACHED();
96 } 93 }
97 } 94 }
98 95
99 void ManagedPrefsBannerBase::Observe(NotificationType type, 96 void ManagedPrefsBannerBase::Observe(NotificationType type,
100 const NotificationSource& source, 97 const NotificationSource& source,
101 const NotificationDetails& details) { 98 const NotificationDetails& details) {
102 if (NotificationType::PREF_CHANGED == type) { 99 if (NotificationType::PREF_CHANGED == type) {
103 std::string* pref = Details<std::string>(details).ptr(); 100 std::string* pref = Details<std::string>(details).ptr();
104 if (pref && (local_state_set_->IsObserved(*pref) || 101 if (pref && (local_state_set_->IsObserved(*pref) ||
105 user_pref_set_->IsObserved(*pref))) 102 user_pref_set_->IsObserved(*pref)))
106 OnUpdateVisibility(); 103 OnUpdateVisibility();
107 } 104 }
108 } 105 }
109 106
110 } // namespace policy 107 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698