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

Unified Diff: net/dns/host_resolver_impl.cc

Issue 1137433003: Encouraging ThreadTaskRunnerHandle usage in net/dns module (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | net/dns/serial_worker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/host_resolver_impl.cc
diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
index bd6e43198dca94319fe32227f5bc89475634f90a..e241e564eb2f205ddbcb09e44a0a9f68e7d4365b 100644
--- a/net/dns/host_resolver_impl.cc
+++ b/net/dns/host_resolver_impl.cc
@@ -21,13 +21,14 @@
#include "base/compiler_specific.h"
#include "base/debug/debugger.h"
#include "base/debug/stack_trace.h"
-#include "base/message_loop/message_loop_proxy.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h"
#include "base/profiler/scoped_tracker.h"
+#include "base/single_thread_task_runner.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/thread_task_runner_handle.h"
#include "base/threading/worker_pool.h"
#include "base/time/time.h"
#include "base/values.h"
@@ -573,7 +574,7 @@ class HostResolverImpl::ProcTask
: key_(key),
params_(params),
callback_(callback),
- origin_loop_(base::MessageLoopProxy::current()),
+ origin_loop_(base::ThreadTaskRunnerHandle::Get()),
attempt_number_(0),
completed_attempt_number_(0),
completed_attempt_error_(ERR_UNEXPECTED),
@@ -904,7 +905,7 @@ class HostResolverImpl::ProcTask
Callback callback_;
// Used to post ourselves onto the origin thread.
- scoped_refptr<base::MessageLoopProxy> origin_loop_;
+ scoped_refptr<base::SingleThreadTaskRunner> origin_loop_;
asanka 2015/05/14 04:06:36 Could you rename this to task_runner_ and document
anujsharma 2015/05/14 04:39:40 Done.
// Keeps track of the number of attempts we have made so far to resolve the
// host. Whenever we start an attempt to resolve the host, we increase this
« no previous file with comments | « no previous file | net/dns/serial_worker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698