Index: chrome/browser/services/gcm/gcm_profile_service.cc |
diff --git a/chrome/browser/services/gcm/gcm_profile_service.cc b/chrome/browser/services/gcm/gcm_profile_service.cc |
index bb2d0c8cecdeebd7ef87e287f20c9680d3132a9a..424f5909fcc43c86e851b7da12966e20ade79f4f 100644 |
--- a/chrome/browser/services/gcm/gcm_profile_service.cc |
+++ b/chrome/browser/services/gcm/gcm_profile_service.cc |
@@ -42,15 +42,20 @@ void GCMProfileService::RegisterProfilePrefs( |
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
} |
+#if defined(OS_ANDROID) |
+GCMProfileService::GCMProfileService(Profile* profile) |
+ : profile_(profile) { |
+ DCHECK(!profile->IsOffTheRecord()); |
+ |
+ driver_.reset(new GCMDriverAndroid); |
+} |
+#else |
GCMProfileService::GCMProfileService( |
Profile* profile, |
scoped_ptr<GCMClientFactory> gcm_client_factory) |
: profile_(profile) { |
DCHECK(!profile->IsOffTheRecord()); |
-#if defined(OS_ANDROID) |
- driver_.reset(new GCMDriverAndroid); |
-#else |
driver_ = CreateGCMDriverDesktop( |
gcm_client_factory.Pass(), |
scoped_ptr<IdentityProvider>(new ProfileIdentityProvider( |
@@ -59,8 +64,8 @@ GCMProfileService::GCMProfileService( |
LoginUIServiceFactory::GetForProfile(profile_))), |
profile_->GetPath().Append(chrome::kGCMStoreDirname), |
profile_->GetRequestContext()); |
-#endif |
} |
+#endif // defined(OS_ANDROID) |
GCMProfileService::GCMProfileService() : profile_(NULL) { |
} |