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

Side by Side Diff: net/dns/host_resolver_impl.cc

Issue 301573002: Fix WeakPtrFactory member order in net/spdy and net/dns (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « net/dns/host_resolver_impl.h ('k') | net/spdy/spdy_http_stream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/dns/host_resolver_impl.h" 5 #include "net/dns/host_resolver_impl.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <Winsock2.h> 8 #include <Winsock2.h>
9 #elif defined(OS_POSIX) 9 #elif defined(OS_POSIX)
10 #include <netdb.h> 10 #include <netdb.h>
(...skipping 1780 matching lines...) Expand 10 before | Expand all | Expand 10 after
1791 scoped_ptr<HostCache> cache, 1791 scoped_ptr<HostCache> cache,
1792 const PrioritizedDispatcher::Limits& job_limits, 1792 const PrioritizedDispatcher::Limits& job_limits,
1793 const ProcTaskParams& proc_params, 1793 const ProcTaskParams& proc_params,
1794 NetLog* net_log) 1794 NetLog* net_log)
1795 : cache_(cache.Pass()), 1795 : cache_(cache.Pass()),
1796 dispatcher_(job_limits), 1796 dispatcher_(job_limits),
1797 max_queued_jobs_(job_limits.total_jobs * 100u), 1797 max_queued_jobs_(job_limits.total_jobs * 100u),
1798 proc_params_(proc_params), 1798 proc_params_(proc_params),
1799 net_log_(net_log), 1799 net_log_(net_log),
1800 default_address_family_(ADDRESS_FAMILY_UNSPECIFIED), 1800 default_address_family_(ADDRESS_FAMILY_UNSPECIFIED),
1801 weak_ptr_factory_(this),
1802 probe_weak_ptr_factory_(this),
1803 received_dns_config_(false), 1801 received_dns_config_(false),
1804 num_dns_failures_(0), 1802 num_dns_failures_(0),
1805 probe_ipv6_support_(true), 1803 probe_ipv6_support_(true),
1806 use_local_ipv6_(false), 1804 use_local_ipv6_(false),
1807 resolved_known_ipv6_hostname_(false), 1805 resolved_known_ipv6_hostname_(false),
1808 additional_resolver_flags_(0), 1806 additional_resolver_flags_(0),
1809 fallback_to_proctask_(true) { 1807 fallback_to_proctask_(true),
1808 weak_ptr_factory_(this),
1809 probe_weak_ptr_factory_(this) {
1810 1810
1811 DCHECK_GE(dispatcher_.num_priorities(), static_cast<size_t>(NUM_PRIORITIES)); 1811 DCHECK_GE(dispatcher_.num_priorities(), static_cast<size_t>(NUM_PRIORITIES));
1812 1812
1813 // Maximum of 4 retry attempts for host resolution. 1813 // Maximum of 4 retry attempts for host resolution.
1814 static const size_t kDefaultMaxRetryAttempts = 4u; 1814 static const size_t kDefaultMaxRetryAttempts = 4u;
1815 1815
1816 if (proc_params_.max_retry_attempts == HostResolver::kDefaultRetryAttempts) 1816 if (proc_params_.max_retry_attempts == HostResolver::kDefaultRetryAttempts)
1817 proc_params_.max_retry_attempts = kDefaultMaxRetryAttempts; 1817 proc_params_.max_retry_attempts = kDefaultMaxRetryAttempts;
1818 1818
1819 #if defined(OS_WIN) 1819 #if defined(OS_WIN)
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
2352 dns_client_->SetConfig(dns_config); 2352 dns_client_->SetConfig(dns_config);
2353 num_dns_failures_ = 0; 2353 num_dns_failures_ = 0;
2354 if (dns_client_->GetConfig()) 2354 if (dns_client_->GetConfig())
2355 UMA_HISTOGRAM_BOOLEAN("AsyncDNS.DnsClientEnabled", true); 2355 UMA_HISTOGRAM_BOOLEAN("AsyncDNS.DnsClientEnabled", true);
2356 } 2356 }
2357 2357
2358 AbortDnsTasks(); 2358 AbortDnsTasks();
2359 } 2359 }
2360 2360
2361 } // namespace net 2361 } // namespace net
OLDNEW
« no previous file with comments | « net/dns/host_resolver_impl.h ('k') | net/spdy/spdy_http_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698