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

Unified Diff: google_apis/gcm/gcm_client_impl.cc

Issue 162233002: [GCM] Remove all persisted data and close connections when signing out of a profile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch Created 6 years, 10 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: 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 20fc976c05336dab43d72027908b4219b439badb..14a94687a923d5672cf583caf1aefd8a94183a86 100644
--- a/google_apis/gcm/gcm_client_impl.cc
+++ b/google_apis/gcm/gcm_client_impl.cc
@@ -271,8 +271,12 @@ void GCMClientImpl::SetDeviceCredentialsCallback(bool success) {
}
void GCMClientImpl::CheckOut() {
- // TODO(jianli): to be implemented.
delegate_ = NULL;
+ device_checkin_info_.Reset();
+ mcs_client_->Destroy(); // This will also destroy GCM store.
fgorski 2014/02/13 00:20:12 Given the ownership of GCMStore the comment sounds
jianli 2014/02/13 00:32:48 Done.
+ mcs_client_.reset();
+ checkin_request_.reset();
+ pending_registrations_.clear();
}
void GCMClientImpl::Register(const std::string& app_id,

Powered by Google App Engine
This is Rietveld 408576698