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

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

Issue 7275018: Make ExtensionContentSettingsStore refcounted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review 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
« no previous file with comments | « no previous file | chrome/browser/content_settings/content_settings_extension_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/content_settings/content_settings_extension_provider.h
diff --git a/chrome/browser/content_settings/content_settings_extension_provider.h b/chrome/browser/content_settings/content_settings_extension_provider.h
index 06c2569c408a443fce06b968b632fee794a2c908..e1bfc27ac3aa1a7b42f602c0d553ed8ccffc5c2b 100644
--- a/chrome/browser/content_settings/content_settings_extension_provider.h
+++ b/chrome/browser/content_settings/content_settings_extension_provider.h
@@ -11,15 +11,16 @@
#include "chrome/browser/extensions/extension_content_settings_store.h"
class ContentSettingsDetails;
+class HostContentSettingsMap;
class Profile;
namespace content_settings {
-// A content settings provider which uses settings defined by extensions.
+// A content settings provider which manages settings defined by extensions.
class ExtensionProvider : public ProviderInterface,
public ExtensionContentSettingsStore::Observer {
public:
- ExtensionProvider(Profile* profile,
+ ExtensionProvider(HostContentSettingsMap* map,
ExtensionContentSettingsStore* extensions_settings,
bool incognito);
@@ -48,24 +49,27 @@ class ExtensionProvider : public ProviderInterface,
virtual void ResetToDefaults() {}
+ virtual void ShutdownOnUIThread();
+
// ExtensionContentSettingsStore::Observer methods:
virtual void OnContentSettingChanged(const std::string& extension_id,
bool incognito);
- virtual void OnDestruction();
-
private:
void NotifyObservers(const ContentSettingsDetails& details);
- // TODO(markusheintz): That's only needed to send Notifications about changed
- // ContentSettings. This will be changed for all ContentSettingsProviders.
- // The HCSM will become an Observer of the ContentSettings Provider and send
- // out the Notifications itself.
- Profile* profile_;
+ // The HostContentSettingsMap this provider belongs to. It is only
+ // used as the source for notifications.
+ // TODO(markusheintz): Make the HCSM an Observer of the
+ // ContentSettingsProvider and send out the Notifications itself.
+ HostContentSettingsMap* map_;
+ // Specifies whether this provider manages settings for incognito or regular
+ // sessions.
bool incognito_;
- ExtensionContentSettingsStore* extensions_settings_; // Weak Pointer
+ // The backend storing content setting rules defined by extensions.
+ scoped_refptr<ExtensionContentSettingsStore> extensions_settings_;
DISALLOW_COPY_AND_ASSIGN(ExtensionProvider);
};
« no previous file with comments | « no previous file | chrome/browser/content_settings/content_settings_extension_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698