Index: google_apis/gcm/gcm_client_impl.cc |
diff --git a/google_apis/gcm/gcm_client_impl.cc b/google_apis/gcm/gcm_client_impl.cc |
index 640977afb806f28efd0624d4a181f0d7495b2a5c..aa12ee88a925f8c13bc2976b4edd2c974e996fc3 100644 |
--- a/google_apis/gcm/gcm_client_impl.cc |
+++ b/google_apis/gcm/gcm_client_impl.cc |
@@ -286,14 +286,19 @@ void GCMClientImpl::SetDeviceCredentialsCallback(bool success) { |
DCHECK(success); |
} |
-void GCMClientImpl::CheckOut() { |
+void GCMClientImpl::Stop() { |
device_checkin_info_.Reset(); |
mcs_client_.reset(); |
- gcm_store_->Destroy(base::Bind(&GCMClientImpl::OnGCMStoreDestroyed, |
- weak_ptr_factory_.GetWeakPtr())); |
checkin_request_.reset(); |
pending_registrations_.clear(); |
state_ = INITIALIZED; |
+ gcm_store_->Close(); |
+} |
+ |
+void GCMClientImpl::CheckOut() { |
+ Stop(); |
+ gcm_store_->Destroy(base::Bind(&GCMClientImpl::OnGCMStoreDestroyed, |
+ weak_ptr_factory_.GetWeakPtr())); |
} |
void GCMClientImpl::Register(const std::string& app_id, |