| Index: google_apis/gcm/engine/checkin_request.cc
|
| diff --git a/google_apis/gcm/engine/checkin_request.cc b/google_apis/gcm/engine/checkin_request.cc
|
| index a5558471772a4043bbc0a5753d3d685678e0a6a1..8ba65adf591949d9d6763a25220a68bb99fa5e68 100644
|
| --- a/google_apis/gcm/engine/checkin_request.cc
|
| +++ b/google_apis/gcm/engine/checkin_request.cc
|
| @@ -80,10 +80,12 @@ void RecordCheckinStatusAndReportUMA(CheckinRequestStatus status,
|
| CheckinRequest::RequestInfo::RequestInfo(
|
| uint64 android_id,
|
| uint64 security_token,
|
| + const std::map<std::string, std::string>& account_tokens,
|
| const std::string& settings_digest,
|
| const checkin_proto::ChromeBuildProto& chrome_build_proto)
|
| : android_id(android_id),
|
| security_token(security_token),
|
| + account_tokens(account_tokens),
|
| settings_digest(settings_digest),
|
| chrome_build_proto(chrome_build_proto) {
|
| }
|
| @@ -127,6 +129,16 @@ void CheckinRequest::Start() {
|
| checkin->set_type(checkin_proto::DEVICE_CHROME_BROWSER);
|
| #endif
|
|
|
| + // Pack a map of email -> token mappings into a repeated field, where odd
|
| + // entries are email addresses, while even ones are respective OAuth2 tokens.
|
| + for (std::map<std::string, std::string>::const_iterator iter =
|
| + request_info_.account_tokens.begin();
|
| + iter != request_info_.account_tokens.end();
|
| + ++iter) {
|
| + request.add_account_cookie(iter->first);
|
| + request.add_account_cookie(iter->second);
|
| + }
|
| +
|
| std::string upload_data;
|
| CHECK(request.SerializeToString(&upload_data));
|
|
|
|
|