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

Unified Diff: chrome/browser/sync/sync_stopped_reporter.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
« no previous file with comments | « chrome/browser/sync/startup_controller.cc ('k') | chrome/browser/sync/test/integration/sessions_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/sync_stopped_reporter.cc
diff --git a/chrome/browser/sync/sync_stopped_reporter.cc b/chrome/browser/sync/sync_stopped_reporter.cc
index ad7b9f42e973284fa771c68d5c562bb71405dee3..b0926f141f4b09ab1c0bcce77a02ad3292730585 100644
--- a/chrome/browser/sync/sync_stopped_reporter.cc
+++ b/chrome/browser/sync/sync_stopped_reporter.cc
@@ -4,8 +4,11 @@
#include "chrome/browser/sync/sync_stopped_reporter.h"
+#include "base/location.h"
#include "base/logging.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/stringprintf.h"
+#include "base/thread_task_runner_handle.h"
#include "base/timer/timer.h"
#include "chrome/browser/profiles/profile.h"
#include "net/base/load_flags.h"
@@ -75,16 +78,16 @@ void SyncStoppedReporter::OnURLFetchComplete(const net::URLFetcher* source) {
fetcher_.reset();
timer_.Stop();
if (!callback_.is_null()) {
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(callback_, result));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(callback_, result));
}
}
void SyncStoppedReporter::OnTimeout() {
fetcher_.reset();
if (!callback_.is_null()) {
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(callback_, RESULT_TIMEOUT));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(callback_, RESULT_TIMEOUT));
}
}
« no previous file with comments | « chrome/browser/sync/startup_controller.cc ('k') | chrome/browser/sync/test/integration/sessions_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698