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

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: 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
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 break; 80 break;
81 case OPTIONS_PAGE_ADVANCED: 81 case OPTIONS_PAGE_ADVANCED:
82 AddUserPref(prefs::kAlternateErrorPagesEnabled); 82 AddUserPref(prefs::kAlternateErrorPagesEnabled);
83 AddUserPref(prefs::kSearchSuggestEnabled); 83 AddUserPref(prefs::kSearchSuggestEnabled);
84 AddUserPref(prefs::kDnsPrefetchingEnabled); 84 AddUserPref(prefs::kDnsPrefetchingEnabled);
85 AddUserPref(prefs::kDisableSpdy); 85 AddUserPref(prefs::kDisableSpdy);
86 AddUserPref(prefs::kSafeBrowsingEnabled); 86 AddUserPref(prefs::kSafeBrowsingEnabled);
87 #if defined(GOOGLE_CHROME_BUILD) 87 #if defined(GOOGLE_CHROME_BUILD)
88 AddLocalStatePref(prefs::kMetricsReportingEnabled); 88 AddLocalStatePref(prefs::kMetricsReportingEnabled);
89 #endif 89 #endif
90 AddUserPref(prefs::kProxyMode); 90 AddUserPref(prefs::kProxy);
91 AddUserPref(prefs::kProxyServer);
92 AddUserPref(prefs::kProxyPacUrl);
93 AddUserPref(prefs::kProxyBypassList);
94 AddUserPref(prefs::kCloudPrintProxyEnabled); 91 AddUserPref(prefs::kCloudPrintProxyEnabled);
95 break; 92 break;
96 default: 93 default:
97 NOTREACHED(); 94 NOTREACHED();
98 } 95 }
99 } 96 }
100 97
101 void ManagedPrefsBannerBase::Observe(NotificationType type, 98 void ManagedPrefsBannerBase::Observe(NotificationType type,
102 const NotificationSource& source, 99 const NotificationSource& source,
103 const NotificationDetails& details) { 100 const NotificationDetails& details) {
104 if (NotificationType::PREF_CHANGED == type) { 101 if (NotificationType::PREF_CHANGED == type) {
105 std::string* pref = Details<std::string>(details).ptr(); 102 std::string* pref = Details<std::string>(details).ptr();
106 if (pref && (local_state_set_->IsObserved(*pref) || 103 if (pref && (local_state_set_->IsObserved(*pref) ||
107 user_pref_set_->IsObserved(*pref))) 104 user_pref_set_->IsObserved(*pref)))
108 OnUpdateVisibility(); 105 OnUpdateVisibility();
109 } 106 }
110 } 107 }
111 108
112 } // namespace policy 109 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/configuration_policy_pref_store_unittest.cc ('k') | chrome/browser/prefs/command_line_pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698