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

Unified Diff: chrome/browser/services/gcm/gcm_account_tracker.cc

Issue 594383003: [GCM] Passing GCMClient::AccountTokenInfo list to GCMDriver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@account-mapper
Patch Set: Addressing CR comments Created 6 years, 3 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: chrome/browser/services/gcm/gcm_account_tracker.cc
diff --git a/chrome/browser/services/gcm/gcm_account_tracker.cc b/chrome/browser/services/gcm/gcm_account_tracker.cc
index 97f775266cfa790a2d0ecad258c244cbd02383e1..ca2cda5c401b99616ef8c54a3269489ffb6510de 100644
--- a/chrome/browser/services/gcm/gcm_account_tracker.cc
+++ b/chrome/browser/services/gcm/gcm_account_tracker.cc
@@ -152,7 +152,7 @@ void GCMAccountTracker::CompleteCollectingTokens() {
}
bool account_removed = false;
- std::map<std::string, std::string> account_tokens;
+ std::vector<GCMClient::AccountTokenInfo> account_tokens;
for (AccountInfos::iterator iter = account_infos_.begin();
iter != account_infos_.end();) {
switch (iter->second.state) {
@@ -165,10 +165,15 @@ void GCMAccountTracker::CompleteCollectingTokens() {
account_infos_.erase(iter++);
break;
- case TOKEN_PRESENT:
- account_tokens[iter->second.email] = iter->second.access_token;
+ case TOKEN_PRESENT: {
+ GCMClient::AccountTokenInfo token_info;
+ token_info.account_id = iter->first;
+ token_info.email = iter->second.email;
+ token_info.access_token = iter->second.access_token;
+ account_tokens.push_back(token_info);
++iter;
break;
+ }
case GETTING_TOKEN:
// This should not happen, as we are making a check that there are no
« no previous file with comments | « chrome/browser/services/gcm/gcm_account_tracker.h ('k') | chrome/browser/services/gcm/gcm_account_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698