Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / services / gcm / gcm_profile_service_factory.cc
index c116c1a..aff75d8 100644 (file)
@@ -37,13 +37,12 @@ GCMProfileServiceFactory::~GCMProfileServiceFactory() {
 
 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;
 }