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

Unified Diff: google_apis/gcm/engine/registration_request.h

Issue 1137463003: Support getting and deleting token for Instance ID. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix trybots Created 5 years, 7 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 1f707b9dd9ee276fd6ddb34609f8f4ddc9fb9595..2bc6f6e6c75b5fddbb5962d5229ecc90dc32f066 100644
--- a/google_apis/gcm/engine/registration_request.h
+++ b/google_apis/gcm/engine/registration_request.h
@@ -59,14 +59,12 @@ class GCM_EXPORT RegistrationRequest : public net::URLFetcherDelegate {
const std::string& registration_id)>
RegistrationCallback;
- // Details of the of the Registration Request. Only user's android ID and
- // its serial number are optional and can be set to 0. All other parameters
- // have to be specified to successfully complete the call.
+ // Encapsulates the common info about a registration/token request.
Nicolas Zea 2015/05/21 21:07:51 Are all parameters mandatory?
jianli 2015/05/21 23:11:24 Yes. Added to comment.
struct GCM_EXPORT RequestInfo {
+ public:
RequestInfo(uint64 android_id,
uint64 security_token,
- const std::string& app_id,
- const std::vector<std::string>& sender_ids);
+ const std::string& app_id);
~RequestInfo();
// Android ID of the device.
@@ -75,10 +73,6 @@ class GCM_EXPORT RegistrationRequest : public net::URLFetcherDelegate {
uint64 security_token;
// Application ID.
std::string app_id;
- // Certificate of the application.
- std::string cert;
- // List of IDs of senders. Allowed up to 100.
- std::vector<std::string> sender_ids;
};
RegistrationRequest(
@@ -96,6 +90,11 @@ class GCM_EXPORT RegistrationRequest : public net::URLFetcherDelegate {
// URLFetcherDelegate implementation.
void OnURLFetchComplete(const net::URLFetcher* source) override;
+ virtual void BuildRequestHeaders(std::string* extra_headers);
Nicolas Zea 2015/05/21 21:07:51 Although I like the approach of injecting extra re
jianli 2015/05/21 23:11:24 I don't fully understand the callback proposal. Co
Nicolas Zea 2015/05/22 14:53:13 So there's be three new constructor parameters, tw
+ virtual void BuildRequestBody(std::string* body);
+ // Returns the source string to print by the stats recorder.
+ virtual std::string GetSourceForRecorder() const = 0;
+
private:
// Schedules a retry attempt, informs the backoff of a previous request's
// failure, when |update_backoff| is true.

Powered by Google App Engine
This is Rietveld 408576698