Index: components/gcm_driver/gcm_client_impl.cc |
diff --git a/components/gcm_driver/gcm_client_impl.cc b/components/gcm_driver/gcm_client_impl.cc |
index d1fc7a08851675aba29f11d23e8b5f872664d0b5..a3abf3963b35686c19c129277a9ade77ca32e4f6 100644 |
--- a/components/gcm_driver/gcm_client_impl.cc |
+++ b/components/gcm_driver/gcm_client_impl.cc |
@@ -321,11 +321,13 @@ void GCMClientImpl::OnLoadCompleted(scoped_ptr<GCMStore::LoadResult> result) { |
device_checkin_info_.accounts_set = true; |
last_checkin_time_ = result->last_checkin_time; |
gservices_settings_.UpdateFromLoadResult(*result); |
+ std::vector<AccountMapping> account_mappings; |
+ account_mappings.swap(result->account_mappings); |
jianli
2014/09/24 21:21:31
Why can't we pass result->account_mappings to OnRe
fgorski
2014/09/24 22:25:40
Added comment as discussed.
|
InitializeMCSClient(result.Pass()); |
if (device_checkin_info_.IsValid()) { |
SchedulePeriodicCheckin(); |
- OnReady(); |
+ OnReady(account_mappings); |
return; |
} |
@@ -379,14 +381,15 @@ void GCMClientImpl::OnFirstTimeDeviceCheckinCompleted( |
base::Bind(&GCMClientImpl::SetDeviceCredentialsCallback, |
weak_ptr_factory_.GetWeakPtr())); |
- OnReady(); |
+ OnReady(std::vector<AccountMapping>()); |
} |
-void GCMClientImpl::OnReady() { |
+void GCMClientImpl::OnReady( |
+ const std::vector<AccountMapping>& account_mappings) { |
state_ = READY; |
StartMCSLogin(); |
- delegate_->OnGCMReady(); |
+ delegate_->OnGCMReady(account_mappings); |
} |
void GCMClientImpl::StartMCSLogin() { |