Index: net/dns/host_resolver_impl.cc |
diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc |
index d10949f23cd9ee91fbef9aa8e909985a715a1563..f89b8e030c0f09ae611242ff0ec89ace99ca13ff 100644 |
--- a/net/dns/host_resolver_impl.cc |
+++ b/net/dns/host_resolver_impl.cc |
@@ -1152,7 +1152,8 @@ class HostResolverImpl::Job : public PrioritizedDispatcher::Job { |
Job(const base::WeakPtr<HostResolverImpl>& resolver, |
const Key& key, |
RequestPriority priority, |
- const BoundNetLog& request_net_log) |
+ const BoundNetLog& request_net_log, |
+ const RequestInfo& info) |
szym
2013/09/16 21:50:32
No need for this. The flags are available in |key.
Elly Fong-Jones
2013/09/16 22:10:11
Done.
|
: resolver_(resolver), |
key_(key), |
priority_tracker_(priority), |
@@ -1162,7 +1163,8 @@ class HostResolverImpl::Job : public PrioritizedDispatcher::Job { |
creation_time_(base::TimeTicks::Now()), |
priority_change_time_(creation_time_), |
net_log_(BoundNetLog::Make(request_net_log.net_log(), |
- NetLog::SOURCE_HOST_RESOLVER_IMPL_JOB)) { |
+ NetLog::SOURCE_HOST_RESOLVER_IMPL_JOB)), |
+ info_(info) { |
request_net_log.AddEvent(NetLog::TYPE_HOST_RESOLVER_IMPL_CREATE_JOB); |
net_log_.BeginEvent( |
@@ -1361,8 +1363,12 @@ class HostResolverImpl::Job : public PrioritizedDispatcher::Job { |
queue_time_after_change); |
} |
+ HostResolverFlags resolver_flags = info_.host_resolver_flags(); |
+ bool native_only = resolver_flags & HOST_RESOLVER_NATIVE_ONLY; |
+ |
// Caution: Job::Start must not complete synchronously. |
- if (had_dns_config_ && !ResemblesMulticastDNSName(key_.hostname)) { |
+ if (!native_only && had_dns_config_ && |
+ !ResemblesMulticastDNSName(key_.hostname)) { |
StartDnsTask(); |
} else { |
StartProcTask(); |
@@ -1652,6 +1658,8 @@ class HostResolverImpl::Job : public PrioritizedDispatcher::Job { |
// A handle used in |HostResolverImpl::dispatcher_|. |
PrioritizedDispatcher::Handle handle_; |
+ |
+ RequestInfo info_; |
}; |
//----------------------------------------------------------------------------- |
@@ -1772,7 +1780,8 @@ int HostResolverImpl::Resolve(const RequestInfo& info, |
Job* job; |
if (jobit == jobs_.end()) { |
job = |
- new Job(weak_ptr_factory_.GetWeakPtr(), key, priority, request_net_log); |
+ new Job(weak_ptr_factory_.GetWeakPtr(), key, priority, request_net_log, |
+ info); |
job->Schedule(); |
// Check for queue overflow. |