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

Side by Side Diff: chrome/browser/content_settings/pref_content_settings_provider.h

Issue 6253012: Add ContentSettingsProvider Interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " 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 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_PREF_CONTENT_SETTINGS_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_PREF_CONTENT_SETTINGS_PROVIDER_H_
6 #define CHROME_BROWSER_CONTENT_SETTINGS_PREF_CONTENT_SETTINGS_PROVIDER_H_ 6 #define CHROME_BROWSER_CONTENT_SETTINGS_PREF_CONTENT_SETTINGS_PROVIDER_H_
7 #pragma once 7 #pragma once
8 8
9 // A content settings provider that takes its settings out of the pref service. 9 // A content settings provider that takes its settings out of the pref service.
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/synchronization/lock.h" 12 #include "base/synchronization/lock.h"
13 #include "chrome/browser/content_settings/content_settings_provider.h" 13 #include "chrome/browser/content_settings/content_settings_provider.h"
14 #include "chrome/browser/prefs/pref_change_registrar.h" 14 #include "chrome/browser/prefs/pref_change_registrar.h"
15 #include "chrome/common/notification_observer.h" 15 #include "chrome/common/notification_observer.h"
16 #include "chrome/common/notification_registrar.h" 16 #include "chrome/common/notification_registrar.h"
17 17
18 class ContentSettingsDetails; 18 class ContentSettingsDetails;
19 class DictionaryValue; 19 class DictionaryValue;
20 class PrefService; 20 class PrefService;
21 class Profile; 21 class Profile;
22 22
23 namespace content_settings {
24
23 class PrefContentSettingsProvider : public DefaultContentSettingsProvider, 25 class PrefContentSettingsProvider : public DefaultContentSettingsProvider,
24 public NotificationObserver { 26 public NotificationObserver {
25 public: 27 public:
26 explicit PrefContentSettingsProvider(Profile* profile); 28 explicit PrefContentSettingsProvider(Profile* profile);
27 virtual ~PrefContentSettingsProvider(); 29 virtual ~PrefContentSettingsProvider();
28 30
29 // DefaultContentSettingsProvider implementation. 31 // DefaultContentSettingsProvider implementation.
30 virtual bool CanProvideDefaultSetting(ContentSettingsType content_type) const; 32 virtual bool CanProvideDefaultSetting(ContentSettingsType content_type) const;
31 virtual ContentSetting ProvideDefaultSetting( 33 virtual ContentSetting ProvideDefaultSetting(
32 ContentSettingsType content_type) const; 34 ContentSettingsType content_type) const;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 PrefChangeRegistrar pref_change_registrar_; 80 PrefChangeRegistrar pref_change_registrar_;
79 NotificationRegistrar notification_registrar_; 81 NotificationRegistrar notification_registrar_;
80 82
81 // Whether we are currently updating preferences, this is used to ignore 83 // Whether we are currently updating preferences, this is used to ignore
82 // notifications from the preferences service that we triggered ourself. 84 // notifications from the preferences service that we triggered ourself.
83 bool updating_preferences_; 85 bool updating_preferences_;
84 86
85 DISALLOW_COPY_AND_ASSIGN(PrefContentSettingsProvider); 87 DISALLOW_COPY_AND_ASSIGN(PrefContentSettingsProvider);
86 }; 88 };
87 89
90 } // content_settings
91
88 #endif // CHROME_BROWSER_CONTENT_SETTINGS_PREF_CONTENT_SETTINGS_PROVIDER_H_ 92 #endif // CHROME_BROWSER_CONTENT_SETTINGS_PREF_CONTENT_SETTINGS_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698