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

Unified Diff: chrome/browser/services/gcm/gcm_product_util.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: Fix thestig nits and Chrome OS compile 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: chrome/browser/services/gcm/gcm_product_util.h
diff --git a/chrome/browser/services/gcm/gcm_product_util.h b/chrome/browser/services/gcm/gcm_product_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..c19bf5a2473cb92902fd309e751baf5b647c9730
--- /dev/null
+++ b/chrome/browser/services/gcm/gcm_product_util.h
@@ -0,0 +1,30 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_SERVICES_GCM_GCM_PRODUCT_UTIL_H_
+#define CHROME_BROWSER_SERVICES_GCM_GCM_PRODUCT_UTIL_H_
+
+#include <string>
+
+class PrefRegistrySimple;
+class PrefService;
+
+namespace user_prefs {
+class PrefRegistrySyncable;
+}
+
+namespace gcm {
+
+// Returns a string like "com.chrome.stable.macosx" that should be used as the
+// GCM category when an app_id is sent as a subtype instead of as a category.
+// This is generated once, then remains fixed forever (even if e.g. the product
+// name or channel change), since it must match existing Instance ID tokens.
+std::string GetProductCategoryForSubtypes(PrefService* prefs);
+
+void RegisterPrefs(PrefRegistrySimple* registry);
+void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
+
+} // namespace gcm
+
+#endif // CHROME_BROWSER_SERVICES_GCM_GCM_PRODUCT_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698