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

Unified Diff: chrome/browser/local_discovery/privet_url_fetcher.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/local_discovery/privet_url_fetcher.cc
diff --git a/chrome/browser/local_discovery/privet_url_fetcher.cc b/chrome/browser/local_discovery/privet_url_fetcher.cc
index 96726df3f23cfaff68c2a3ebac41e81a3572bcad..390fb8350425fcddb07cfe50a48d5b6029d2151d 100644
--- a/chrome/browser/local_discovery/privet_url_fetcher.cc
+++ b/chrome/browser/local_discovery/privet_url_fetcher.cc
@@ -8,10 +8,12 @@
#include "base/bind.h"
#include "base/json/json_reader.h"
+#include "base/location.h"
#include "base/memory/singleton.h"
-#include "base/message_loop/message_loop.h"
#include "base/rand_util.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/stringprintf.h"
+#include "base/thread_task_runner_handle.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/local_discovery/privet_constants.h"
#include "content/public/browser/browser_thread.h"
@@ -349,9 +351,8 @@ void PrivetURLFetcher::ScheduleRetry(int timeout_seconds) {
timeout_seconds_randomized =
std::max(timeout_seconds_randomized, kPrivetMinimumTimeout);
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&PrivetURLFetcher::Try, weak_factory_.GetWeakPtr()),
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE, base::Bind(&PrivetURLFetcher::Try, weak_factory_.GetWeakPtr()),
base::TimeDelta::FromSeconds(timeout_seconds_randomized));
}

Powered by Google App Engine
This is Rietveld 408576698