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

Unified Diff: chrome/browser/services/gcm/gcm_profile_service_factory.cc

Issue 286213003: Make GCMProfileService own GCMDriver, instead of deriving from it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync Created 6 years, 7 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/services/gcm/gcm_profile_service_factory.cc
diff --git a/chrome/browser/services/gcm/gcm_profile_service_factory.cc b/chrome/browser/services/gcm/gcm_profile_service_factory.cc
index 2e380b1579c4542e8d3e1eacd52d159352c6a8f3..2cd5bd723ca605c4259b7ff90987b56b42139ce1 100644
--- a/chrome/browser/services/gcm/gcm_profile_service_factory.cc
+++ b/chrome/browser/services/gcm/gcm_profile_service_factory.cc
@@ -50,11 +50,9 @@ GCMProfileServiceFactory::~GCMProfileServiceFactory() {
KeyedService* GCMProfileServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
- Profile* profile = static_cast<Profile*>(context);
- GCMProfileService* service = new GCMProfileService(profile);
- scoped_ptr<GCMClientFactory> gcm_client_factory(new GCMClientFactory);
- service->Initialize(gcm_client_factory.Pass());
- return service;
+ return new GCMProfileService(
+ Profile::FromBrowserContext(context),
+ scoped_ptr<GCMClientFactory>(new GCMClientFactory));
}
content::BrowserContext* GCMProfileServiceFactory::GetBrowserContextToUse(
« no previous file with comments | « chrome/browser/services/gcm/gcm_profile_service.cc ('k') | chrome/browser/services/gcm/gcm_profile_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698