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

Unified Diff: google_apis/gcm/engine/registration_request.cc

Issue 1232193002: Replace MessageLoop::current() with ThreadTaskRunnerHandle::Get() in GCM (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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/engine/registration_request.cc
diff --git a/google_apis/gcm/engine/registration_request.cc b/google_apis/gcm/engine/registration_request.cc
index a593e2bf833243d1ef3297faef094469ae9dee0e..95d25a754169dae5149d713aeb84ef433f86cedc 100644
--- a/google_apis/gcm/engine/registration_request.cc
+++ b/google_apis/gcm/engine/registration_request.cc
@@ -5,9 +5,11 @@
#include "google_apis/gcm/engine/registration_request.h"
#include "base/bind.h"
+#include "base/location.h"
#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram.h"
#include "base/strings/string_number_conversions.h"
+#include "base/thread_task_runner_handle.h"
#include "base/values.h"
#include "google_apis/gcm/base/gcm_util.h"
#include "google_apis/gcm/monitoring/gcm_stats_recorder.h"
@@ -172,7 +174,7 @@ void RegistrationRequest::RetryWithBackoff(bool update_backoff) {
source_to_record_,
backoff_entry_.GetTimeUntilRelease().InMilliseconds(),
retries_left_ + 1);
- base::MessageLoop::current()->PostDelayedTask(
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE,
base::Bind(&RegistrationRequest::RetryWithBackoff,
weak_ptr_factory_.GetWeakPtr(),

Powered by Google App Engine
This is Rietveld 408576698