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

Unified Diff: chrome/browser/content_settings/content_settings_policy_provider.h

Issue 11293249: Remove PrefObserver usage, batch 3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/content_settings/content_settings_policy_provider.h
diff --git a/chrome/browser/content_settings/content_settings_policy_provider.h b/chrome/browser/content_settings/content_settings_policy_provider.h
index 096c09b9fa254a5457a46c1dcdaffe4148c3918b..b9c2b4bfbd9d9148292d93c6b45be3b3f0593e31 100644
--- a/chrome/browser/content_settings/content_settings_policy_provider.h
+++ b/chrome/browser/content_settings/content_settings_policy_provider.h
@@ -11,7 +11,6 @@
#include "base/basictypes.h"
#include "base/prefs/public/pref_change_registrar.h"
-#include "base/prefs/public/pref_observer.h"
#include "base/synchronization/lock.h"
#include "chrome/browser/content_settings/content_settings_observable_provider.h"
#include "chrome/browser/content_settings/content_settings_origin_identifier_value_map.h"
@@ -21,8 +20,7 @@ class PrefService;
namespace content_settings {
// PolicyProvider that provides managed content-settings.
-class PolicyProvider : public ObservableProvider,
- public PrefObserver {
+class PolicyProvider : public ObservableProvider {
public:
explicit PolicyProvider(PrefService* prefs);
virtual ~PolicyProvider();
@@ -46,14 +44,13 @@ class PolicyProvider : public ObservableProvider,
virtual void ShutdownOnUIThread() OVERRIDE;
- // PrefObserver implementation.
- virtual void OnPreferenceChanged(PrefServiceBase* service,
- const std::string& pref_name) OVERRIDE;
-
private:
// Reads the policy managed default settings.
void ReadManagedDefaultSettings();
+ // Callback for preference changes.
+ void OnPreferenceChanged(const std::string& pref_name);
+
// Reads the policy controlled default settings for a specific content type.
void UpdateManagedDefaultSetting(ContentSettingsType content_type);

Powered by Google App Engine
This is Rietveld 408576698