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

Unified Diff: chrome/browser/ui/app_list/search/app_result.h

Issue 298023009: Remove InstallTracker's extension load, unload observer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/search/app_result.h
diff --git a/chrome/browser/ui/app_list/search/app_result.h b/chrome/browser/ui/app_list/search/app_result.h
index 061d17cca0f84d67d069620af92aac3a0a671633..285998a3401a5ed62ff664fde5b8a7fd2d0f8aa4 100644
--- a/chrome/browser/ui/app_list/search/app_result.h
+++ b/chrome/browser/ui/app_list/search/app_result.h
@@ -8,18 +8,19 @@
#include <string>
#include "base/memory/scoped_ptr.h"
+#include "base/scoped_observer.h"
#include "chrome/browser/extensions/extension_icon_image.h"
-#include "chrome/browser/extensions/install_observer.h"
#include "chrome/browser/ui/app_list/app_context_menu_delegate.h"
#include "chrome/browser/ui/app_list/search/chrome_search_result.h"
#include "chrome/browser/ui/extensions/extension_enable_flow_delegate.h"
+#include "extensions/browser/extension_registry_observer.h"
class AppListControllerDelegate;
class ExtensionEnableFlow;
class Profile;
namespace extensions {
-class InstallTracker;
+class ExtensionRegistry;
}
namespace app_list {
@@ -32,7 +33,7 @@ class AppResult : public ChromeSearchResult,
public extensions::IconImage::Observer,
public AppContextMenuDelegate,
public ExtensionEnableFlowDelegate,
- public extensions::InstallObserver {
+ public extensions::ExtensionRegistryObserver {
public:
AppResult(Profile* profile,
const std::string& app_id,
@@ -50,9 +51,6 @@ class AppResult : public ChromeSearchResult,
virtual ChromeSearchResultType GetType() OVERRIDE;
private:
- void StartObservingInstall();
- void StopObservingInstall();
-
// Checks if extension is disabled and if enable flow should be started.
// Returns true if extension enable flow is started or there is already one
// running.
@@ -72,24 +70,27 @@ class AppResult : public ChromeSearchResult,
virtual void ExtensionEnableFlowFinished() OVERRIDE;
virtual void ExtensionEnableFlowAborted(bool user_initiated) OVERRIDE;
- // extensions::InstallObserver overrides:
+ // extensions::ExtensionRegistryObserver override:
virtual void OnExtensionLoaded(
+ content::BrowserContext* browser_context,
const extensions::Extension* extension) OVERRIDE;
virtual void OnExtensionUninstalled(
+ content::BrowserContext* browser_context,
const extensions::Extension* extension) OVERRIDE;
- virtual void OnShutdown() OVERRIDE;
Profile* profile_;
const std::string app_id_;
AppListControllerDelegate* controller_;
+ ScopedObserver<extensions::ExtensionRegistry,
+ extensions::ExtensionRegistryObserver>
+ extension_registry_observer_;
+
bool is_platform_app_;
scoped_ptr<extensions::IconImage> icon_;
scoped_ptr<AppContextMenu> context_menu_;
scoped_ptr<ExtensionEnableFlow> extension_enable_flow_;
- extensions::InstallTracker* install_tracker_; // Not owned.
-
DISALLOW_COPY_AND_ASSIGN(AppResult);
};

Powered by Google App Engine
This is Rietveld 408576698