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

Unified Diff: google_apis/gcm/tools/mcs_probe.cc

Issue 147193003: [GCM] Fix memory leaks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows Created 6 years, 11 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 | « google_apis/gcm/gcm_client_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gcm/tools/mcs_probe.cc
diff --git a/google_apis/gcm/tools/mcs_probe.cc b/google_apis/gcm/tools/mcs_probe.cc
index f2528ef252c04fc8f9e277096bf2bba551a32a88..7dce59346cc9d5bbd036ed9a0b21a28f022e890d 100644
--- a/google_apis/gcm/tools/mcs_probe.cc
+++ b/google_apis/gcm/tools/mcs_probe.cc
@@ -181,7 +181,7 @@ class MCSProbe {
void InitializeNetworkState();
void BuildNetworkSession();
- void LoadCallback(const GCMStore::LoadResult& load_result);
+ void LoadCallback(scoped_ptr<GCMStore::LoadResult> load_result);
void ErrorCallback();
void OnCheckInCompleted(uint64 android_id, uint64 secret);
@@ -280,15 +280,15 @@ void MCSProbe::Start() {
run_loop_->Run();
}
-void MCSProbe::LoadCallback(const GCMStore::LoadResult& load_result) {
- DCHECK(load_result.success);
- android_id_ = load_result.device_android_id;
- secret_ = load_result.device_security_token;
+void MCSProbe::LoadCallback(scoped_ptr<GCMStore::LoadResult> load_result) {
+ DCHECK(load_result->success);
+ android_id_ = load_result->device_android_id;
+ secret_ = load_result->device_security_token;
mcs_client_->Initialize(
base::Bind(&MCSProbe::ErrorCallback, base::Unretained(this)),
base::Bind(&MessageReceivedCallback),
base::Bind(&MessageSentCallback),
- load_result);
+ load_result.Pass());
if (!android_id_ || !secret_) {
CheckIn();
« no previous file with comments | « google_apis/gcm/gcm_client_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698