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

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

Issue 7344008: Make the hcsm and its providers communicate via an observer interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/content_settings/host_content_settings_map.h
diff --git a/chrome/browser/content_settings/host_content_settings_map.h b/chrome/browser/content_settings/host_content_settings_map.h
index 10fda1015b573594448d6eae47d11e1b4ac4d62e..06f3e2b9778422fd17e4d92e70216f4ed03cf3af 100644
--- a/chrome/browser/content_settings/host_content_settings_map.h
+++ b/chrome/browser/content_settings/host_content_settings_map.h
@@ -19,6 +19,7 @@
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
#include "chrome/browser/content_settings/content_settings_pattern.h"
+#include "chrome/browser/content_settings/content_settings_observer.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/common/content_settings.h"
#include "content/browser/browser_thread.h"
@@ -27,7 +28,7 @@
namespace content_settings {
class DefaultProviderInterface;
-class ProviderInterface;
+class AbstractProvider;
} // namespace content_settings
class ContentSettingsDetails;
@@ -38,7 +39,8 @@ class PrefService;
class Profile;
class HostContentSettingsMap
- : public NotificationObserver,
+ : public content_settings::Observer,
+ public NotificationObserver,
public base::RefCountedThreadSafe<HostContentSettingsMap> {
public:
typedef Tuple3<ContentSettingsPattern, ContentSetting, std::string>
@@ -190,6 +192,10 @@ class HostContentSettingsMap
// thread should be called anymore.
void ShutdownOnUIThread();
+ // ProviderObserverInterface implementation.
Bernhard Bauer 2011/07/13 07:58:18 Nit: The interface is called just |content_setting
markusheintz_ 2011/07/13 12:48:16 Done.
+ virtual void OnContentSettingChanged(
+ const ContentSettingsDetails& details);
+
// NotificationObserver implementation.
virtual void Observe(int type,
const NotificationSource& source,
@@ -227,7 +233,7 @@ class HostContentSettingsMap
default_content_settings_providers_;
// Content setting providers.
- std::vector<linked_ptr<content_settings::ProviderInterface> >
+ std::vector<linked_ptr<content_settings::AbstractProvider> >
Bernhard Bauer 2011/07/13 07:58:18 Wait, I think we should still use the base interfa
markusheintz_ 2011/07/13 12:48:16 Oh yeah. Forgot to change that back. Initially I r
content_settings_providers_;
// Used around accesses to the following objects to guarantee thread safety.

Powered by Google App Engine
This is Rietveld 408576698