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

Unified Diff: chrome/browser/autocomplete/shortcuts_extensions_manager.h

Issue 2787713002: Remove deprecated extension notification from shortcuts_extensions_manager.h/cc (Closed)
Patch Set: review Created 3 years, 9 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/autocomplete/shortcuts_extensions_manager.h
diff --git a/chrome/browser/autocomplete/shortcuts_extensions_manager.h b/chrome/browser/autocomplete/shortcuts_extensions_manager.h
index 13e645b6f2e79cf8a66fe4a47824d26e0dcfe8dd..cb63abef5e496786b488ddd838a5558e73d31ef0 100644
--- a/chrome/browser/autocomplete/shortcuts_extensions_manager.h
+++ b/chrome/browser/autocomplete/shortcuts_extensions_manager.h
@@ -6,28 +6,37 @@
#define CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_EXTENSIONS_MANAGER_H_
#include "base/macros.h"
+#include "base/scoped_observer.h"
#include "base/supports_user_data.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
+#include "extensions/browser/extension_registry_observer.h"
class Profile;
+namespace extensions {
+class ExtensionRegistry;
+}
+
// This class manages the removal of shortcuts associated with an extension when
// that extension is unloaded.
-class ShortcutsExtensionsManager : public base::SupportsUserData::Data,
- public content::NotificationObserver {
+class ShortcutsExtensionsManager
+ : public base::SupportsUserData::Data,
+ public extensions::ExtensionRegistryObserver {
public:
explicit ShortcutsExtensionsManager(Profile* profile);
~ShortcutsExtensionsManager() override;
- private:
- // content::NotificationObserver:
- void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) override;
+ // extensions::ExtensionRegistryObserver:
+ void OnExtensionUnloaded(
+ content::BrowserContext* browser_context,
+ const extensions::Extension* extension,
+ extensions::UnloadedExtensionInfo::Reason reason) override;
+ void OnShutdown(extensions::ExtensionRegistry* registry) override;
+ private:
+ ScopedObserver<extensions::ExtensionRegistry,
+ extensions::ExtensionRegistryObserver>
+ registry_observer_;
Profile* profile_;
- content::NotificationRegistrar notification_registrar_;
DISALLOW_COPY_AND_ASSIGN(ShortcutsExtensionsManager);
};
« no previous file with comments | « chrome/browser/autocomplete/shortcuts_backend_factory.cc ('k') | chrome/browser/autocomplete/shortcuts_extensions_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698