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

Unified Diff: chrome/browser/ui/app_list/recommended_apps.h

Issue 298023009: Remove InstallTracker's extension load, unload observer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and shutdown 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/ui/app_list/recommended_apps.h
diff --git a/chrome/browser/ui/app_list/recommended_apps.h b/chrome/browser/ui/app_list/recommended_apps.h
index 0253d80b6acfc3d24afe0092afb7834990435477..372689f36a9db5881a556885752aa5100889616b 100644
--- a/chrome/browser/ui/app_list/recommended_apps.h
+++ b/chrome/browser/ui/app_list/recommended_apps.h
@@ -11,17 +11,22 @@
#include "base/memory/ref_counted.h"
#include "base/observer_list.h"
#include "base/prefs/pref_change_registrar.h"
-#include "chrome/browser/extensions/install_observer.h"
+#include "base/scoped_observer.h"
+#include "extensions/browser/extension_registry_observer.h"
class Profile;
+namespace extensions {
+class ExtensionRegistry;
+}
+
namespace app_list {
class RecommendedAppsObserver;
// A class that maintains a list of recommended apps by watching changes
// to app state.
-class RecommendedApps : public extensions::InstallObserver {
+class RecommendedApps : public extensions::ExtensionRegistryObserver {
public:
typedef std::vector<scoped_refptr<const extensions::Extension> > Apps;
@@ -36,14 +41,18 @@ class RecommendedApps : public extensions::InstallObserver {
private:
void Update();
- // extensions::InstallObserver overrides:
- virtual void OnExtensionInstalled(
- const extensions::Extension* extension) OVERRIDE;
+ // extensions::ExtensionRegistryObserver overrides:
virtual void OnExtensionLoaded(
+ content::BrowserContext* browser_context,
const extensions::Extension* extension) OVERRIDE;
- virtual void OnExtensionUnloaded(
- const extensions::Extension* extension) OVERRIDE;
+ virtual void OnExtensionWillBeInstalled(
+ content::BrowserContext* browser_context,
+ const extensions::Extension* extension,
+ bool is_update,
+ bool from_ephemeral,
+ const std::string& old_name) OVERRIDE;
virtual void OnExtensionUninstalled(
+ content::BrowserContext* browser_context,
const extensions::Extension* extension) OVERRIDE;
Profile* profile_;
@@ -52,6 +61,10 @@ class RecommendedApps : public extensions::InstallObserver {
Apps apps_;
ObserverList<RecommendedAppsObserver, true> observers_;
+ ScopedObserver<extensions::ExtensionRegistry,
+ extensions::ExtensionRegistryObserver>
+ extension_registry_observer_;
+
DISALLOW_COPY_AND_ASSIGN(RecommendedApps);
};

Powered by Google App Engine
This is Rietveld 408576698