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

Unified Diff: chrome/browser/apps/ephemeral_app_service.h

Issue 298253002: cleanup: Remove NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED from c/b/apps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unwanted DCHECK 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
« no previous file with comments | « no previous file | chrome/browser/apps/ephemeral_app_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/apps/ephemeral_app_service.h
diff --git a/chrome/browser/apps/ephemeral_app_service.h b/chrome/browser/apps/ephemeral_app_service.h
index a1d4fbb26943b1f4e84263f0308b4f3dbd357cb1..edad28dc79453d9b89ac1342ca62bd53ecfd4257 100644
--- a/chrome/browser/apps/ephemeral_app_service.h
+++ b/chrome/browser/apps/ephemeral_app_service.h
@@ -8,20 +8,24 @@
#include <map>
#include <set>
+#include "base/scoped_observer.h"
#include "base/timer/timer.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 Extension;
+class ExtensionRegistry;
} // namespace extensions
// Performs the background garbage collection of ephemeral apps.
class EphemeralAppService : public KeyedService,
- public content::NotificationObserver {
+ public content::NotificationObserver,
+ public extensions::ExtensionRegistryObserver {
public:
// Returns the instance for the given profile. This is a convenience wrapper
// around EphemeralAppServiceFactory::GetForProfile.
@@ -52,6 +56,16 @@ class EphemeralAppService : public KeyedService,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
+ // extensions::ExtensionRegistryObserver.
+ virtual void OnExtensionWillBeInstalled(
+ content::BrowserContext* browser_context,
+ const extensions::Extension* extension,
+ bool is_update,
+ const std::string& old_name) OVERRIDE;
+ virtual void OnExtensionUninstalled(
+ content::BrowserContext* browser_context,
+ const extensions::Extension* extension) OVERRIDE;
+
void Init();
void InitEphemeralAppCount();
@@ -70,6 +84,10 @@ class EphemeralAppService : public KeyedService,
content::NotificationRegistrar registrar_;
+ ScopedObserver<extensions::ExtensionRegistry,
+ extensions::ExtensionRegistryObserver>
+ extension_registry_observer_;
+
base::OneShotTimer<EphemeralAppService> garbage_collect_apps_timer_;
base::OneShotTimer<EphemeralAppService> garbage_collect_data_timer_;
« no previous file with comments | « no previous file | chrome/browser/apps/ephemeral_app_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698