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

Unified Diff: apps/app_load_service.h

Issue 441553002: Remove deprecated extension notification from AppLoadService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | apps/app_load_service.cc » ('j') | apps/app_load_service.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/app_load_service.h
diff --git a/apps/app_load_service.h b/apps/app_load_service.h
index 1f4998003a3d34a26547c2926b1a5f4d285e4486..362135d8aa63e3af19bef5de44c6ef7090b2b847 100644
--- a/apps/app_load_service.h
+++ b/apps/app_load_service.h
@@ -8,15 +8,18 @@
#include <map>
#include <string>
+#include "base/scoped_observer.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "components/keyed_service/core/keyed_service.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;
struct UnloadedExtensionInfo;
}
@@ -25,7 +28,8 @@ namespace apps {
// Monitors apps being reloaded and performs app specific actions (like launch
// or restart) on them. Also provides an interface to schedule these actions.
class AppLoadService : public KeyedService,
- public content::NotificationObserver {
+ public content::NotificationObserver,
+ public extensions::ExtensionRegistryObserver {
public:
enum PostReloadActionType {
LAUNCH,
@@ -67,8 +71,15 @@ class AppLoadService : public KeyedService,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
+ // extensions::ExtensionRegistryObserver.
+ virtual void OnExtensionUnloaded(
+ content::BrowserContext* browser_context,
+ const extensions::Extension* extension,
+ extensions::UnloadedExtensionInfo::Reason reason) OVERRIDE;
+
bool WasUnloadedForReload(
- const extensions::UnloadedExtensionInfo& unload_info);
+ const extensions::ExtensionId& extension_id,
+ const extensions::UnloadedExtensionInfo::Reason unload_info);
bool HasPostReloadAction(const std::string& extension_id);
// Map of extension id to reload action. Absence from the map implies
@@ -77,6 +88,10 @@ class AppLoadService : public KeyedService,
content::NotificationRegistrar registrar_;
Profile* profile_;
+ ScopedObserver<extensions::ExtensionRegistry,
+ extensions::ExtensionRegistryObserver>
+ extension_registry_observer_;
+
DISALLOW_COPY_AND_ASSIGN(AppLoadService);
};
« no previous file with comments | « no previous file | apps/app_load_service.cc » ('j') | apps/app_load_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698