Commit 6026661e authored by limasdf's avatar limasdf Committed by Commit bot

Revert of Remove deprecated extension notification from content_settings...

Revert of Remove deprecated extension notification from content_settings (patchset #6 id:240001 of https://codereview.chromium.org/276573011/)

Reason for revert:
Becuase this CL seems to break linux asan test
http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel/builds/882

Original issue's description:
> remove deprecated extension notification from content_settings.
>
> Use ExtensionRegistryObserver instead.
>
> R=bauerb@chromium.org
> BUG=354046, 354458
> TEST=unit_tests
>
> Committed: https://crrev.com/76ad58487578183de69a8caeb48b8a22dccad652
> Cr-Commit-Position: refs/heads/master@{#294768}

TBR=bauerb@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=354046, 354458

Review URL: https://codereview.chromium.org/553263004

Cr-Commit-Position: refs/heads/master@{#294773}
parent b704ac2b
......@@ -12,21 +12,18 @@
#include "components/content_settings/core/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 extensions::ExtensionRegistryObserver {
public content::NotificationObserver {
public:
explicit InternalExtensionProvider(ExtensionService* extension_service);
......@@ -54,16 +51,6 @@ class InternalExtensionProvider : public ObservableProvider,
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
// extensions::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;
private:
void SetContentSettingForExtension(const extensions::Extension* extension,
ContentSetting setting);
......@@ -78,8 +65,6 @@ class InternalExtensionProvider : public ObservableProvider,
mutable base::Lock lock_;
scoped_ptr<content::NotificationRegistrar> registrar_;
extensions::ExtensionRegistry* extension_registry_; // Not owned.
DISALLOW_COPY_AND_ASSIGN(InternalExtensionProvider);
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment