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 5e55f1561bca5b1aa2a170436313ecf7af51e771..d6d4bd5d980609a8dc7f40b96f7eb091fc4ca001 100644 |
--- a/google_apis/gcm/engine/checkin_request.cc |
+++ b/google_apis/gcm/engine/checkin_request.cc |
@@ -52,6 +52,7 @@ CheckinRequest::CheckinRequest( |
const checkin_proto::ChromeBuildProto& chrome_build_proto, |
uint64 android_id, |
uint64 security_token, |
+ const std::vector<std::string>& account_ids, |
net::URLRequestContextGetter* request_context_getter) |
: request_context_getter_(request_context_getter), |
callback_(callback), |
@@ -59,6 +60,7 @@ CheckinRequest::CheckinRequest( |
chrome_build_proto_(chrome_build_proto), |
android_id_(android_id), |
security_token_(security_token), |
+ account_ids_(account_ids), |
weak_ptr_factory_(this) { |
} |
@@ -81,6 +83,12 @@ void CheckinRequest::Start() { |
checkin->set_type(checkin_proto::DEVICE_CHROME_BROWSER); |
#endif |
+ for (std::vector<std::string>::iterator iter = account_ids_.begin(); |
jianli
2014/02/19 01:18:12
nit: const_iterator
fgorski
2014/02/19 19:00:25
Done.
|
+ iter != account_ids_.end(); ++iter) { |
+ std::string* account_cookie = request.add_account_cookie(); |
+ *account_cookie = "[" + *iter + "]"; |
jianli
2014/02/19 01:18:12
Why not just:
request.add_account_cookie("[" + *
fgorski
2014/02/19 19:00:25
Done. Couldn't find documentation for it.
|
+ } |
+ |
std::string upload_data; |
CHECK(request.SerializeToString(&upload_data)); |