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

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

Issue 1102193002: Remove NOTIFICATION_EXTENSIONS_READY from ephemeral_app_service.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « chrome/browser/apps/ephemeral_app_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/apps/ephemeral_app_service.cc
diff --git a/chrome/browser/apps/ephemeral_app_service.cc b/chrome/browser/apps/ephemeral_app_service.cc
index 6eb8da85ba8db0b48dd9f0526d031f13281d0f03..d5ff5b4b094eb8aeca1d8adad66e664bd5ec0887 100644
--- a/chrome/browser/apps/ephemeral_app_service.cc
+++ b/chrome/browser/apps/ephemeral_app_service.cc
@@ -8,22 +8,18 @@
#include "base/command_line.h"
#include "base/message_loop/message_loop.h"
#include "chrome/browser/apps/ephemeral_app_service_factory.h"
-#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_switches.h"
-#include "content/public/browser/notification_service.h"
-#include "content/public/browser/notification_source.h"
-#include "content/public/browser/notification_types.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/extension_util.h"
-#include "extensions/browser/notification_types.h"
#include "extensions/browser/uninstall_reason.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_set.h"
+#include "extensions/common/one_shot_event.h"
using extensions::Extension;
using extensions::ExtensionPrefs;
@@ -71,9 +67,9 @@ EphemeralAppService::EphemeralAppService(Profile* profile)
ephemeral_app_count_(-1),
disable_idle_app_delay_(kDefaultDisableAppDelay),
weak_ptr_factory_(this) {
- registrar_.Add(this,
- extensions::NOTIFICATION_EXTENSIONS_READY_DEPRECATED,
- content::Source<Profile>(profile_));
+ ExtensionSystem::Get(profile_)->ready().Post(
+ FROM_HERE,
+ base::Bind(&EphemeralAppService::Init, weak_ptr_factory_.GetWeakPtr()));
}
EphemeralAppService::~EphemeralAppService() {
@@ -115,20 +111,6 @@ void EphemeralAppService::ClearCachedApps() {
}
}
-void EphemeralAppService::Observe(
- int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- switch (type) {
- case extensions::NOTIFICATION_EXTENSIONS_READY_DEPRECATED: {
- Init();
- break;
- }
- default:
- NOTREACHED();
- }
-}
-
void EphemeralAppService::OnExtensionWillBeInstalled(
content::BrowserContext* browser_context,
const extensions::Extension* extension,
« no previous file with comments | « chrome/browser/apps/ephemeral_app_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698