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

Unified Diff: net/proxy/proxy_resolver_v8.cc

Issue 125107: * Move the global "DnsResolutionObserver" code depended on by DNS prefetcher,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Address jar's comments Created 11 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 | « net/net.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_resolver_v8.cc
===================================================================
--- net/proxy/proxy_resolver_v8.cc (revision 18360)
+++ net/proxy/proxy_resolver_v8.cc (working copy)
@@ -70,15 +70,16 @@
// Run the resolve on host_resolver_loop, and wait for result.
int Resolve(const std::string& hostname, net::AddressList* addresses) {
- int kPort = 80; // Doesn't matter.
+ // Port number doesn't matter.
+ HostResolver::RequestInfo info(hostname, 80);
// Hack for tests -- run synchronously on current thread.
if (!host_resolver_loop_)
- return host_resolver_->Resolve(hostname, kPort, addresses, NULL, NULL);
+ return host_resolver_->Resolve(info, addresses, NULL, NULL);
// Otherwise start an async resolve on the resolver's thread.
host_resolver_loop_->PostTask(FROM_HERE, NewRunnableMethod(this,
- &SyncHostResolverBridge::StartResolve, hostname, kPort, addresses));
+ &SyncHostResolverBridge::StartResolve, info, addresses));
// Wait for the resolve to complete in the resolver's thread.
event_.Wait();
@@ -87,12 +88,10 @@
private:
// Called on host_resolver_loop_.
- void StartResolve(const std::string& hostname,
- int port,
+ void StartResolve(const HostResolver::RequestInfo& info,
net::AddressList* addresses) {
DCHECK_EQ(host_resolver_loop_, MessageLoop::current());
- int error = host_resolver_->Resolve(
- hostname, port, addresses, &callback_, NULL);
+ int error = host_resolver_->Resolve(info, addresses, &callback_, NULL);
if (error != ERR_IO_PENDING)
OnResolveCompletion(error); // Completed synchronously.
}
« no previous file with comments | « net/net.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698