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

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

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
Index: ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.h
diff --git a/ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.h b/ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.h
index edef82911fcab2d6e21d5ec27a5332016931900c..7c9956809e73e2380868860aad2126bf6065c3ea 100644
--- a/ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.h
+++ b/ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.h
@@ -6,6 +6,7 @@
#define IOS_CHROME_BROWSER_SERVICES_GCM_IOS_CHROME_GCM_PROFILE_SERVICE_FACTORY_H_
#include <memory>
+#include <string>
#include "base/macros.h"
#include "components/keyed_service/ios/browser_state_keyed_service_factory.h"
@@ -33,6 +34,13 @@ class IOSChromeGCMProfileServiceFactory
static IOSChromeGCMProfileServiceFactory* GetInstance();
+ // Returns a string like "com.chrome.ios" that should be used as the GCM
+ // category when an app_id is sent as a subtype instead of as a category. This
+ // string must never change during the lifetime of a Chrome install, since
+ // e.g. to unregister an Instance ID token the same category must be passed to
+ // GCM as was originally passed when registering it.
+ static std::string GetProductCategoryForSubtypes();
+
private:
friend struct base::DefaultSingletonTraits<IOSChromeGCMProfileServiceFactory>;

Powered by Google App Engine
This is Rietveld 408576698