| 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
|
| +}
|
| +
|
| 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),
|
|
|