| 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 61f9cb122998ac50b7756d9f74e4d22085bec9ab..ce07eebeb301a213b34a82417d6449837cf1b6fe 100644
|
| --- a/components/gcm_driver/gcm_driver_desktop.cc
|
| +++ b/components/gcm_driver/gcm_driver_desktop.cc
|
| @@ -132,6 +132,10 @@ 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,
|
| + bool account_removed);
|
| +
|
| // For testing purpose. Can be called from UI thread. Use with care.
|
| GCMClient* gcm_client_for_testing() const { return gcm_client_.get(); }
|
|
|
| @@ -345,6 +349,15 @@ 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,
|
| + bool account_removed) {
|
| + DCHECK(io_thread_->RunsTasksOnCurrentThread());
|
| +
|
| + if (gcm_client_.get())
|
| + gcm_client_->SetAccountsForCheckin(account_tokens, account_removed);
|
| +}
|
| +
|
| GCMDriverDesktop::GCMDriverDesktop(
|
| scoped_ptr<GCMClientFactory> gcm_client_factory,
|
| const GCMClient::ChromeBuildInfo& chrome_build_info,
|
| @@ -581,6 +594,19 @@ void GCMDriverDesktop::SetGCMRecording(const GetGCMStatisticsCallback& callback,
|
| recording));
|
| }
|
|
|
| +void GCMDriverDesktop::SetAccountsForCheckin(
|
| + const std::map<std::string, std::string>& account_tokens,
|
| + bool account_removed) {
|
| + DCHECK(ui_thread_->RunsTasksOnCurrentThread());
|
| +
|
| + io_thread_->PostTask(
|
| + FROM_HERE,
|
| + base::Bind(&GCMDriverDesktop::IOWorker::SetAccountsForCheckin,
|
| + base::Unretained(io_worker_.get()),
|
| + account_tokens,
|
| + account_removed));
|
| +}
|
| +
|
| GCMClient::Result GCMDriverDesktop::EnsureStarted() {
|
| DCHECK(ui_thread_->RunsTasksOnCurrentThread());
|
|
|
|
|