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

Unified Diff: net/proxy/sync_host_resolver_bridge.cc

Issue 9121055: Add a source to V8 proxy resolver-initiated DNS requests, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Update year Created 8 years, 11 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 | « net/proxy/sync_host_resolver_bridge.h ('k') | net/proxy/sync_host_resolver_bridge_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/sync_host_resolver_bridge.cc
===================================================================
--- net/proxy/sync_host_resolver_bridge.cc (revision 118864)
+++ net/proxy/sync_host_resolver_bridge.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -23,7 +23,8 @@
Core(HostResolver* resolver, MessageLoop* host_resolver_loop);
int ResolveSynchronously(const HostResolver::RequestInfo& info,
- AddressList* addresses);
+ AddressList* addresses,
+ const BoundNetLog& net_log);
// Returns true if Shutdown() has been called.
bool HasShutdown() const {
@@ -43,7 +44,8 @@
// Called on |host_resolver_loop_|.
void StartResolve(const HostResolver::RequestInfo& info,
- AddressList* addresses);
+ AddressList* addresses,
+ const BoundNetLog& net_log);
// Called on |host_resolver_loop_|.
void OnResolveCompletion(int result);
@@ -82,18 +84,20 @@
int SyncHostResolverBridge::Core::ResolveSynchronously(
const HostResolver::RequestInfo& info,
- net::AddressList* addresses) {
+ net::AddressList* addresses,
+ const BoundNetLog& net_log) {
// Otherwise start an async resolve on the resolver's thread.
host_resolver_loop_->PostTask(
FROM_HERE,
- base::Bind(&Core::StartResolve, this, info, addresses));
+ base::Bind(&Core::StartResolve, this, info, addresses, net_log));
return WaitForResolveCompletion();
}
void SyncHostResolverBridge::Core::StartResolve(
const HostResolver::RequestInfo& info,
- net::AddressList* addresses) {
+ net::AddressList* addresses,
+ const BoundNetLog& net_log) {
DCHECK_EQ(MessageLoop::current(), host_resolver_loop_);
DCHECK(!outstanding_request_);
@@ -102,7 +106,7 @@
int error = host_resolver_->Resolve(
info, addresses, base::Bind(&Core::OnResolveCompletion, this),
- &outstanding_request_, BoundNetLog());
+ &outstanding_request_, net_log);
if (error != ERR_IO_PENDING)
OnResolveCompletion(error); // Completed synchronously.
}
@@ -159,8 +163,9 @@
}
int SyncHostResolverBridge::Resolve(const HostResolver::RequestInfo& info,
- AddressList* addresses) {
- return core_->ResolveSynchronously(info, addresses);
+ AddressList* addresses,
+ const BoundNetLog& net_log) {
+ return core_->ResolveSynchronously(info, addresses, net_log);
}
void SyncHostResolverBridge::Shutdown() {
« no previous file with comments | « net/proxy/sync_host_resolver_bridge.h ('k') | net/proxy/sync_host_resolver_bridge_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698