| 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..d4a0fb783b6440ef177872ba7926dd2ab0167ac9 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,22 @@ class RecommendedApps : public extensions::InstallObserver {
|
| private:
|
| void Update();
|
|
|
| - // extensions::InstallObserver overrides:
|
| - virtual void OnExtensionInstalled(
|
| - const extensions::Extension* extension) OVERRIDE;
|
| + // extensions::ExtensionRegistryObserver overrides:
|
| + 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 OnExtensionLoaded(
|
| + content::BrowserContext* browser_context,
|
| const extensions::Extension* extension) OVERRIDE;
|
| virtual void OnExtensionUnloaded(
|
| - const extensions::Extension* extension) OVERRIDE;
|
| + content::BrowserContext* browser_context,
|
| + const extensions::Extension* extension,
|
| + extensions::UnloadedExtensionInfo::Reason reason) OVERRIDE;
|
| virtual void OnExtensionUninstalled(
|
| + content::BrowserContext* browser_context,
|
| const extensions::Extension* extension) OVERRIDE;
|
|
|
| Profile* profile_;
|
| @@ -52,6 +65,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);
|
| };
|
|
|
|
|