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

Unified Diff: chrome/browser/local_discovery/privet_http_impl.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_http_impl.cc
diff --git a/chrome/browser/local_discovery/privet_http_impl.cc b/chrome/browser/local_discovery/privet_http_impl.cc
index 38d546f40ca01205c709f67356a8eb55122d60a7..5649a0d7b29072288884e6f345acc5ff53b9cf0f 100644
--- a/chrome/browser/local_discovery/privet_http_impl.cc
+++ b/chrome/browser/local_discovery/privet_http_impl.cc
@@ -8,10 +8,12 @@
#include <vector>
#include "base/bind.h"
-#include "base/message_loop/message_loop.h"
+#include "base/location.h"
#include "base/rand_util.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/thread_task_runner_handle.h"
#include "chrome/browser/local_discovery/privet_constants.h"
#include "net/base/url_util.h"
#include "url/gurl.h"
@@ -146,7 +148,7 @@ void PrivetRegisterOperationImpl::Cancel() {
// Owned by the message loop.
Cancelation* cancelation = new Cancelation(privet_client_, user_);
- base::MessageLoop::current()->PostDelayedTask(
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE,
base::Bind(&PrivetRegisterOperationImpl::Cancelation::Cleanup,
base::Owned(cancelation)),
@@ -573,7 +575,7 @@ void PrivetLocalPrintOperationImpl::OnSubmitdocResponse(
timeout = std::max(timeout, kPrivetMinimumTimeout);
- base::MessageLoop::current()->PostDelayedTask(
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, base::Bind(&PrivetLocalPrintOperationImpl::DoCreatejob,
weak_factory_.GetWeakPtr()),
base::TimeDelta::FromSeconds(timeout));

Powered by Google App Engine
This is Rietveld 408576698