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

Unified Diff: chrome/browser/extensions/api/push_messaging/push_messaging_api.cc

Issue 13197004: Draft: InvalidationService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Passes tests Created 7 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
Index: chrome/browser/extensions/api/push_messaging/push_messaging_api.cc
diff --git a/chrome/browser/extensions/api/push_messaging/push_messaging_api.cc b/chrome/browser/extensions/api/push_messaging/push_messaging_api.cc
index 7a9409f4b8608dcd063e65245548cdf90e44261d..41db33cf31ef64f4087894a13fdd7674ee35da03 100644
--- a/chrome/browser/extensions/api/push_messaging/push_messaging_api.cc
+++ b/chrome/browser/extensions/api/push_messaging/push_messaging_api.cc
@@ -19,11 +19,11 @@
#include "chrome/browser/extensions/extension_system_factory.h"
#include "chrome/browser/extensions/token_cache/token_cache_service.h"
#include "chrome/browser/extensions/token_cache/token_cache_service_factory.h"
+#include "chrome/browser/invalidation_service.h"
+#include "chrome/browser/invalidation_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/token_service.h"
#include "chrome/browser/signin/token_service_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
-#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/api/push_messaging.h"
@@ -272,17 +272,17 @@ PushMessagingAPI::GetFactoryInstance() {
void PushMessagingAPI::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
- ProfileSyncService* pss = ProfileSyncServiceFactory::GetForProfile(profile_);
+ InvalidationService* is = InvalidationServiceFactory::GetForProfile(profile_);
tim (not reviewing) 2013/04/15 16:48:24 nit - |service| would be a better name here, we sh
rlarocque 2013/04/22 21:47:15 Done.
// This may be NULL; for example, for the ChromeOS guest user. In these cases,
// just return without setting up anything, since it won't work anyway.
- if (!pss)
+ if (!is)
return;
if (!event_router_)
event_router_.reset(new PushMessagingEventRouter(profile_));
if (!handler_) {
handler_.reset(new PushMessagingInvalidationHandler(
- pss, event_router_.get()));
+ is, event_router_.get()));
}
switch (type) {
case chrome::NOTIFICATION_EXTENSION_INSTALLED: {
@@ -320,7 +320,7 @@ void PushMessagingAPI::SetMapperForTest(
template <>
void ProfileKeyedAPIFactory<PushMessagingAPI>::DeclareFactoryDependencies() {
DependsOn(ExtensionSystemFactory::GetInstance());
- DependsOn(ProfileSyncServiceFactory::GetInstance());
+ DependsOn(InvalidationServiceFactory::GetInstance());
}
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698