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

Unified Diff: components/gcm_driver/gcm_driver_desktop.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
« no previous file with comments | « components/gcm_driver/gcm_driver_desktop.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/gcm_driver_desktop.cc
diff --git a/components/gcm_driver/gcm_driver_desktop.cc b/components/gcm_driver/gcm_driver_desktop.cc
index b2d2e558c32c207b63bbd799f9d1fa1a4eb0d680..4f8345938abd93289d657e51d54bb1a932bb7e40 100644
--- a/components/gcm_driver/gcm_driver_desktop.cc
+++ b/components/gcm_driver/gcm_driver_desktop.cc
@@ -13,6 +13,7 @@
#include "base/logging.h"
#include "base/sequenced_task_runner.h"
#include "base/threading/sequenced_worker_pool.h"
+#include "components/gcm_driver/gcm_account_mapper.h"
#include "components/gcm_driver/gcm_app_handler.h"
#include "components/gcm_driver/gcm_channel_status_syncer.h"
#include "components/gcm_driver/gcm_client_factory.h"
@@ -75,8 +76,8 @@ class GCMDriverDesktop::IOWorker : public GCMClient::Delegate {
void GetGCMStatistics(bool clear_logs);
void SetGCMRecording(bool recording);
- void SetAccountsForCheckin(
- const std::map<std::string, std::string>& account_tokens);
+ void SetAccountTokens(
+ const std::vector<GCMClient::AccountTokenInfo>& account_tokens);
void UpdateAccountMapping(const AccountMapping& account_mapping);
void RemoveAccountMapping(const std::string& account_id);
@@ -306,12 +307,12 @@ void GCMDriverDesktop::IOWorker::SetGCMRecording(bool recording) {
base::Bind(&GCMDriverDesktop::GetGCMStatisticsFinished, service_, stats));
}
-void GCMDriverDesktop::IOWorker::SetAccountsForCheckin(
- const std::map<std::string, std::string>& account_tokens) {
+void GCMDriverDesktop::IOWorker::SetAccountTokens(
+ const std::vector<GCMClient::AccountTokenInfo>& account_tokens) {
DCHECK(io_thread_->RunsTasksOnCurrentThread());
if (gcm_client_.get())
- gcm_client_->SetAccountsForCheckin(account_tokens);
+ gcm_client_->SetAccountTokens(account_tokens);
}
void GCMDriverDesktop::IOWorker::UpdateAccountMapping(
@@ -614,13 +615,13 @@ void GCMDriverDesktop::RemoveAccountMapping(const std::string& account_id) {
account_id));
}
-void GCMDriverDesktop::SetAccountsForCheckin(
- const std::map<std::string, std::string>& account_tokens) {
+void GCMDriverDesktop::SetAccountTokens(
+ const std::vector<GCMClient::AccountTokenInfo>& account_tokens) {
DCHECK(ui_thread_->RunsTasksOnCurrentThread());
io_thread_->PostTask(
FROM_HERE,
- base::Bind(&GCMDriverDesktop::IOWorker::SetAccountsForCheckin,
+ base::Bind(&GCMDriverDesktop::IOWorker::SetAccountTokens,
base::Unretained(io_worker_.get()),
account_tokens));
}
« no previous file with comments | « components/gcm_driver/gcm_driver_desktop.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698