Index: ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.cc |
diff --git a/ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.cc b/ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.cc |
index abe148c203262355df0d8991b94d1f0454b14f48..35db7f15f76565e9b6cd4b45e050a9782448bdfc 100644 |
--- a/ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.cc |
+++ b/ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.cc |
@@ -32,6 +32,18 @@ IOSChromeGCMProfileServiceFactory::GetInstance() { |
return base::Singleton<IOSChromeGCMProfileServiceFactory>::get(); |
} |
+// static |
+std::string IOSChromeGCMProfileServiceFactory::GetProductCategoryForSubtypes() { |
+#if defined(GOOGLE_CHROME_BUILD) |
+ std::string channel = ::GetChannelString(); |
+ if (channel.empty()) |
+ channel = "stable"; |
+ return "com.chrome." + channel + ".ios"; |
+#else |
+ return "org.chromium.unknown.ios"; |
+#endif |
droger
2016/08/16 08:05:23
Why is this code different on iOS? Would it make s
johnme
2016/08/18 17:43:22
iOS can't access the cross platform version in chr
droger
2016/08/19 09:10:28
Ok thanks, this seems reasonable indeed.
FYI ther
|
+} |
+ |
IOSChromeGCMProfileServiceFactory::IOSChromeGCMProfileServiceFactory() |
: BrowserStateKeyedServiceFactory( |
"GCMProfileService", |
@@ -57,6 +69,7 @@ IOSChromeGCMProfileServiceFactory::BuildServiceInstanceFor( |
return base::WrapUnique(new gcm::GCMProfileService( |
browser_state->GetPrefs(), browser_state->GetStatePath(), |
browser_state->GetRequestContext(), ::GetChannel(), |
+ GetProductCategoryForSubtypes(), |
base::WrapUnique(new ProfileIdentityProvider( |
ios::SigninManagerFactory::GetForBrowserState(browser_state), |
OAuth2TokenServiceFactory::GetForBrowserState(browser_state), |