Chromium Code Reviews| 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 |