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

Unified Diff: google_apis/gcm/engine/registration_request.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: Address jianli's review comments 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: google_apis/gcm/engine/registration_request.h
diff --git a/google_apis/gcm/engine/registration_request.h b/google_apis/gcm/engine/registration_request.h
index cb45c974a6664372c4bfe581ba8ed1b7dc67212e..fd04035b12f540e8197e5a65dec496af6bd9201d 100644
--- a/google_apis/gcm/engine/registration_request.h
+++ b/google_apis/gcm/engine/registration_request.h
@@ -67,15 +67,22 @@ class GCM_EXPORT RegistrationRequest : public net::URLFetcherDelegate {
struct GCM_EXPORT RequestInfo {
RequestInfo(uint64_t android_id,
uint64_t security_token,
- const std::string& app_id);
+ const std::string& category,
+ const std::string& subtype);
~RequestInfo();
// Android ID of the device.
uint64_t android_id;
// Security token of the device.
uint64_t security_token;
- // Application ID.
- std::string app_id;
+
+ // Application ID used in Chrome to refer to registration/token's owner.
+ const std::string& app_id() { return subtype.empty() ? category : subtype; }
jianli 2016/08/17 21:12:08 nit: add const modifier
johnme 2016/08/18 17:43:22 Done.
+
+ // GCM category field derived from the |app_id|.
jianli 2016/08/17 21:12:08 Having "derived from the |app_id|" in this comment
johnme 2016/08/18 17:43:22 Done.
+ std::string category;
+ // GCM subtype field derived from the |app_id|.
+ std::string subtype;
};
// Encapsulates the custom logic that is needed to build and process the

Powered by Google App Engine
This is Rietveld 408576698