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

Unified Diff: ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.cc

Issue 2111973002: Add support for GCM subtypes to desktop Instance ID implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@iid9push
Patch Set: Remove channel from product_category_for_subtypes, and address nits Created 4 years, 4 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
« no previous file with comments | « ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5d98fc4958f00d75a5acf6a33185407681a9cda5 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,15 @@ IOSChromeGCMProfileServiceFactory::GetInstance() {
return base::Singleton<IOSChromeGCMProfileServiceFactory>::get();
}
+// static
+std::string IOSChromeGCMProfileServiceFactory::GetProductCategoryForSubtypes() {
+#if defined(GOOGLE_CHROME_BUILD)
+ return "com.chrome.ios";
+#else
+ return "org.chromium.ios";
+#endif
+}
+
IOSChromeGCMProfileServiceFactory::IOSChromeGCMProfileServiceFactory()
: BrowserStateKeyedServiceFactory(
"GCMProfileService",
@@ -57,6 +66,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),
« no previous file with comments | « ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698