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

Unified Diff: components/gcm_driver/gcm_client_impl.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_client_impl.cc
diff --git a/components/gcm_driver/gcm_client_impl.cc b/components/gcm_driver/gcm_client_impl.cc
index 45975091d2d1d431ee9689b2c034487ff1e63cfe..7777402bd096378bba606a221b06ca7ba88b7b51 100644
--- a/components/gcm_driver/gcm_client_impl.cc
+++ b/components/gcm_driver/gcm_client_impl.cc
@@ -6,14 +6,16 @@
#include "base/bind.h"
#include "base/files/file_path.h"
+#include "base/location.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
-#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram_macros.h"
#include "base/sequenced_task_runner.h"
+#include "base/single_thread_task_runner.h"
#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
+#include "base/thread_task_runner_handle.h"
#include "base/time/default_clock.h"
#include "base/timer/timer.h"
#include "components/gcm_driver/gcm_account_mapper.h"
@@ -719,10 +721,9 @@ void GCMClientImpl::SchedulePeriodicCheckin() {
if (time_to_next_checkin < base::TimeDelta())
time_to_next_checkin = base::TimeDelta();
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&GCMClientImpl::StartCheckin,
- periodic_checkin_ptr_factory_.GetWeakPtr()),
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE, base::Bind(&GCMClientImpl::StartCheckin,
+ periodic_checkin_ptr_factory_.GetWeakPtr()),
time_to_next_checkin);
}
« no previous file with comments | « components/gcm_driver/gcm_channel_status_syncer.cc ('k') | components/gcm_driver/gcm_client_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698