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

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

Issue 276573011: Remove deprecated extension notification from content_settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 6 years, 6 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_internal_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_internal_extension_provider.h
diff --git a/chrome/browser/content_settings/content_settings_internal_extension_provider.h b/chrome/browser/content_settings/content_settings_internal_extension_provider.h
index cb97bd63eaabba2929093035ce7c79267b80e756..5cdb3cd3c790e151ca8e1f6d77b3daa55cc96620 100644
--- a/chrome/browser/content_settings/content_settings_internal_extension_provider.h
+++ b/chrome/browser/content_settings/content_settings_internal_extension_provider.h
@@ -6,24 +6,28 @@
#define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_INTERNAL_EXTENSION_PROVIDER_H_
#include "base/memory/scoped_ptr.h"
+#include "base/scoped_observer.h"
Bernhard Bauer 2014/06/10 09:34:16 This isn't necessary anymore.
limasdf 2014/06/10 09:37:17 Done.
#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"
#include "chrome/common/content_settings.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "extensions/browser/extension_registry_observer.h"
class ExtensionService;
namespace extensions {
class Extension;
+class ExtensionRegistry;
}
namespace content_settings {
// A content settings provider which disables certain plugins for platform apps.
class InternalExtensionProvider : public ObservableProvider,
- public content::NotificationObserver {
+ public content::NotificationObserver,
+ public extensions::ExtensionRegistryObserver {
public:
explicit InternalExtensionProvider(ExtensionService* extension_service);
@@ -51,6 +55,17 @@ class InternalExtensionProvider : public ObservableProvider,
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
+
+ // extension::ExtensionRegistryObserver implementation.
+ virtual void OnExtensionLoaded(
+ content::BrowserContext* browser_context,
+ const extensions::Extension* extension) OVERRIDE;
+ virtual void OnExtensionUnloaded(
+ content::BrowserContext* browser_context,
+ const extensions::Extension* extension,
+ extensions::UnloadedExtensionInfo::Reason reason) OVERRIDE;
+ virtual void OnShutdown(extensions::ExtensionRegistry* registry) OVERRIDE;
+
private:
void SetContentSettingForExtension(const extensions::Extension* extension,
ContentSetting setting);
@@ -65,6 +80,8 @@ class InternalExtensionProvider : public ObservableProvider,
mutable base::Lock lock_;
scoped_ptr<content::NotificationRegistrar> registrar_;
+ extensions::ExtensionRegistry* extension_registry_; // Not owned.
+
DISALLOW_COPY_AND_ASSIGN(InternalExtensionProvider);
};
« no previous file with comments | « no previous file | chrome/browser/content_settings/content_settings_internal_extension_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698