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

Unified Diff: chrome/browser/services/gcm/gcm_account_tracker.cc

Issue 1143343005: chrome/browser: 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, 6 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: chrome/browser/services/gcm/gcm_account_tracker.cc
diff --git a/chrome/browser/services/gcm/gcm_account_tracker.cc b/chrome/browser/services/gcm/gcm_account_tracker.cc
index 85987731917d9f9e7e3b872f505afcb9ea12cec8..e9d5d0982cb4cef3cc309b43ec4e6bf70f78d723 100644
--- a/chrome/browser/services/gcm/gcm_account_tracker.cc
+++ b/chrome/browser/services/gcm/gcm_account_tracker.cc
@@ -8,7 +8,9 @@
#include <vector>
#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 "base/time/time.h"
#include "components/gcm_driver/gcm_driver.h"
#include "google_apis/gaia/google_service_auth_error.h"
@@ -91,10 +93,9 @@ void GCMAccountTracker::ScheduleReportTokens() {
<< GetTimeToNextTokenReporting().InSeconds() << " seconds.";
reporting_weak_ptr_factory_.InvalidateWeakPtrs();
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&GCMAccountTracker::ReportTokens,
- reporting_weak_ptr_factory_.GetWeakPtr()),
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE, base::Bind(&GCMAccountTracker::ReportTokens,
+ reporting_weak_ptr_factory_.GetWeakPtr()),
GetTimeToNextTokenReporting());
}
« no previous file with comments | « chrome/browser/services/gcm/fake_gcm_profile_service.cc ('k') | chrome/browser/services/gcm/gcm_account_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698