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

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: Created 9 years, 11 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 break; 78 break;
79 case OPTIONS_PAGE_ADVANCED: 79 case OPTIONS_PAGE_ADVANCED:
80 AddUserPref(prefs::kAlternateErrorPagesEnabled); 80 AddUserPref(prefs::kAlternateErrorPagesEnabled);
81 AddUserPref(prefs::kSearchSuggestEnabled); 81 AddUserPref(prefs::kSearchSuggestEnabled);
82 AddUserPref(prefs::kDnsPrefetchingEnabled); 82 AddUserPref(prefs::kDnsPrefetchingEnabled);
83 AddUserPref(prefs::kDisableSpdy); 83 AddUserPref(prefs::kDisableSpdy);
84 AddUserPref(prefs::kSafeBrowsingEnabled); 84 AddUserPref(prefs::kSafeBrowsingEnabled);
85 #if defined(GOOGLE_CHROME_BUILD) 85 #if defined(GOOGLE_CHROME_BUILD)
86 AddLocalStatePref(prefs::kMetricsReportingEnabled); 86 AddLocalStatePref(prefs::kMetricsReportingEnabled);
87 #endif 87 #endif
88 AddUserPref(prefs::kProxyMode); 88 AddUserPref(prefs::kProxy);
89 AddUserPref(prefs::kProxyServer);
90 AddUserPref(prefs::kProxyPacUrl);
91 AddUserPref(prefs::kProxyBypassList);
92 break; 89 break;
93 default: 90 default:
94 NOTREACHED(); 91 NOTREACHED();
95 } 92 }
96 } 93 }
97 94
98 void ManagedPrefsBannerBase::Observe(NotificationType type, 95 void ManagedPrefsBannerBase::Observe(NotificationType type,
99 const NotificationSource& source, 96 const NotificationSource& source,
100 const NotificationDetails& details) { 97 const NotificationDetails& details) {
101 if (NotificationType::PREF_CHANGED == type) { 98 if (NotificationType::PREF_CHANGED == type) {
102 std::string* pref = Details<std::string>(details).ptr(); 99 std::string* pref = Details<std::string>(details).ptr();
103 if (pref && (local_state_set_->IsObserved(*pref) || 100 if (pref && (local_state_set_->IsObserved(*pref) ||
104 user_pref_set_->IsObserved(*pref))) 101 user_pref_set_->IsObserved(*pref)))
105 OnUpdateVisibility(); 102 OnUpdateVisibility();
106 } 103 }
107 } 104 }
108 105
109 } // namespace policy 106 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698