Chromium Code Reviews| 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. |