BrowserContextKeyedService* GCMProfileServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
- GCMClientFactory::BuildClientFromUI();
-
Profile* profile = static_cast<Profile*>(context);
if (!gcm::GCMProfileService::IsGCMEnabled(profile))
return NULL;
GCMProfileService* service = new GCMProfileService(profile);
- service->Initialize();
+ scoped_ptr<GCMClientFactory> gcm_client_factory(new GCMClientFactory);
+ service->Initialize(gcm_client_factory.Pass());
return service;
}