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

Unified Diff: chrome/browser/extensions/api/alarms/alarm_manager.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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/alarms/alarm_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/alarms/alarm_manager.h
diff --git a/chrome/browser/extensions/api/alarms/alarm_manager.h b/chrome/browser/extensions/api/alarms/alarm_manager.h
index 95cfabcb66c793a9c7b1221720aa6a01305a9cca..c6763984f3ba432cb069b2a4984b2c2fb7d49cd5 100644
--- a/chrome/browser/extensions/api/alarms/alarm_manager.h
+++ b/chrome/browser/extensions/api/alarms/alarm_manager.h
@@ -15,10 +15,7 @@
#include "base/scoped_observer.h"
#include "base/timer/timer.h"
#include "chrome/common/extensions/api/alarms.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_function.h"
#include "extensions/browser/extension_registry_observer.h"
namespace base {
@@ -56,7 +53,6 @@ struct Alarm {
// Manages the currently pending alarms for every extension in a profile.
// There is one manager per virtual Profile.
class AlarmManager : public BrowserContextKeyedAPI,
- public content::NotificationObserver,
public ExtensionRegistryObserver,
public base::SupportsWeakPtr<AlarmManager> {
public:
@@ -204,14 +200,11 @@ class AlarmManager : public BrowserContextKeyedAPI,
// alarm data has been synced from the storage.
void RunWhenReady(const std::string& extension_id, const ReadyAction& action);
- // NotificationObserver:
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
-
- // Overridden from extensions::ExtensionRegistryObserver.
+ // ExtensionRegistryObserver implementation.
virtual void OnExtensionLoaded(content::BrowserContext* browser_context,
const Extension* extension) OVERRIDE;
+ virtual void OnExtensionUninstalled(content::BrowserContext* browser_context,
+ const Extension* extension) OVERRIDE;
// BrowserContextKeyedAPI implementation.
static const char* service_name() {
@@ -221,7 +214,6 @@ class AlarmManager : public BrowserContextKeyedAPI,
content::BrowserContext* const browser_context_;
scoped_ptr<base::Clock> clock_;
- content::NotificationRegistrar registrar_;
scoped_ptr<Delegate> delegate_;
// Listen to extension load notifications.
« no previous file with comments | « no previous file | chrome/browser/extensions/api/alarms/alarm_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698