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

Unified Diff: components/gcm_driver/gcm_channel_status_request.cc

Issue 1144153004: components: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 7 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: components/gcm_driver/gcm_channel_status_request.cc
diff --git a/components/gcm_driver/gcm_channel_status_request.cc b/components/gcm_driver/gcm_channel_status_request.cc
index 3cdf3ec0b7197eedc1f3ae07c702459f0dfdc4ba..bafaee3663ef8c9e82e832ec4ef09b3c7380c7f8 100644
--- a/components/gcm_driver/gcm_channel_status_request.cc
+++ b/components/gcm_driver/gcm_channel_status_request.cc
@@ -5,7 +5,9 @@
#include "components/gcm_driver/gcm_channel_status_request.h"
#include "base/bind.h"
-#include "base/message_loop/message_loop.h"
+#include "base/location.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
#include "components/gcm_driver/gcm_backoff_policy.h"
#include "net/base/escape.h"
#include "net/base/load_flags.h"
@@ -142,11 +144,9 @@ void GCMChannelStatusRequest::RetryWithBackoff(bool update_backoff) {
DVLOG(1) << "Delaying GCM channel request for "
<< backoff_entry_.GetTimeUntilRelease().InMilliseconds()
<< " ms.";
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&GCMChannelStatusRequest::RetryWithBackoff,
- weak_ptr_factory_.GetWeakPtr(),
- false),
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE, base::Bind(&GCMChannelStatusRequest::RetryWithBackoff,
+ weak_ptr_factory_.GetWeakPtr(), false),
backoff_entry_.GetTimeUntilRelease());
return;
}
« no previous file with comments | « components/gcm_driver/fake_gcm_client.cc ('k') | components/gcm_driver/gcm_channel_status_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698