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

Unified Diff: chrome/browser/extensions/extension_gcm_app_handler.h

Issue 299393002: Use ExtensionRegistryObserver instead of deprecated extension notification from c/b/extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 7 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/extensions/extension_gcm_app_handler.h
diff --git a/chrome/browser/extensions/extension_gcm_app_handler.h b/chrome/browser/extensions/extension_gcm_app_handler.h
index 5da91b71d05697e282bc1532e4c60a9fcdca5527..8bff0a77fe282a3b2a76cf35a12bff9b2b118416 100644
--- a/chrome/browser/extensions/extension_gcm_app_handler.h
+++ b/chrome/browser/extensions/extension_gcm_app_handler.h
@@ -13,8 +13,6 @@
#include "base/memory/weak_ptr.h"
#include "base/scoped_observer.h"
#include "components/gcm_driver/gcm_app_handler.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
#include "extensions/browser/browser_context_keyed_api_factory.h"
#include "extensions/browser/extension_registry_observer.h"
#include "google_apis/gcm/gcm_client.h"
@@ -38,7 +36,6 @@ class GcmJsEventRouter;
// Defines the interface to provide handling logic for a given app.
class ExtensionGCMAppHandler : public gcm::GCMAppHandler,
public BrowserContextKeyedAPI,
- public content::NotificationObserver,
public ExtensionRegistryObserver {
public:
explicit ExtensionGCMAppHandler(content::BrowserContext* context);
@@ -65,11 +62,6 @@ class ExtensionGCMAppHandler : public gcm::GCMAppHandler,
private:
friend class BrowserContextKeyedAPIFactory<ExtensionGCMAppHandler>;
- // content::NotificationObserver implementation.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
-
// ExtensionRegistryObserver implementation.
virtual void OnExtensionLoaded(content::BrowserContext* browser_context,
const Extension* extension) OVERRIDE;
@@ -77,6 +69,8 @@ class ExtensionGCMAppHandler : public gcm::GCMAppHandler,
content::BrowserContext* browser_context,
const Extension* extension,
UnloadedExtensionInfo::Reason reason) OVERRIDE;
+ virtual void OnExtensionUninstalled(content::BrowserContext* browser_context,
+ const Extension* extension) OVERRIDE;
gcm::GCMDriver* GetGCMDriver() const;
@@ -85,7 +79,6 @@ class ExtensionGCMAppHandler : public gcm::GCMAppHandler,
static const bool kServiceIsNULLWhileTesting = true;
Profile* profile_;
- content::NotificationRegistrar registrar_;
// Listen to extension load, unloaded notifications.
ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>

Powered by Google App Engine
This is Rietveld 408576698