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

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

Issue 2229393003: net: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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/dns_socket_pool.cc ('k') | net/dns/mdns_client_impl.cc » ('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 1877 matching lines...) Expand 10 before | Expand all | Expand 10 after
1888 : HostResolverImpl( 1888 : HostResolverImpl(
1889 options, 1889 options,
1890 net_log, 1890 net_log,
1891 base::WorkerPool::GetTaskRunner(true /* task_is_slow */)) {} 1891 base::WorkerPool::GetTaskRunner(true /* task_is_slow */)) {}
1892 1892
1893 HostResolverImpl::~HostResolverImpl() { 1893 HostResolverImpl::~HostResolverImpl() {
1894 // Prevent the dispatcher from starting new jobs. 1894 // Prevent the dispatcher from starting new jobs.
1895 dispatcher_->SetLimitsToZero(); 1895 dispatcher_->SetLimitsToZero();
1896 // It's now safe for Jobs to call KillDsnTask on destruction, because 1896 // It's now safe for Jobs to call KillDsnTask on destruction, because
1897 // OnJobComplete will not start any new jobs. 1897 // OnJobComplete will not start any new jobs.
1898 STLDeleteValues(&jobs_); 1898 base::STLDeleteValues(&jobs_);
1899 1899
1900 NetworkChangeNotifier::RemoveIPAddressObserver(this); 1900 NetworkChangeNotifier::RemoveIPAddressObserver(this);
1901 NetworkChangeNotifier::RemoveConnectionTypeObserver(this); 1901 NetworkChangeNotifier::RemoveConnectionTypeObserver(this);
1902 NetworkChangeNotifier::RemoveDNSObserver(this); 1902 NetworkChangeNotifier::RemoveDNSObserver(this);
1903 } 1903 }
1904 1904
1905 void HostResolverImpl::SetMaxQueuedJobs(size_t value) { 1905 void HostResolverImpl::SetMaxQueuedJobs(size_t value) {
1906 DCHECK_EQ(0u, dispatcher_->num_queued_jobs()); 1906 DCHECK_EQ(0u, dispatcher_->num_queued_jobs());
1907 DCHECK_GT(value, 0u); 1907 DCHECK_GT(value, 0u);
1908 max_queued_jobs_ = value; 1908 max_queued_jobs_ = value;
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
2609 if (job_) 2609 if (job_)
2610 job_->CancelRequest(this); 2610 job_->CancelRequest(this);
2611 } 2611 }
2612 2612
2613 void HostResolverImpl::RequestImpl::ChangeRequestPriority( 2613 void HostResolverImpl::RequestImpl::ChangeRequestPriority(
2614 RequestPriority priority) { 2614 RequestPriority priority) {
2615 job_->ChangeRequestPriority(this, priority); 2615 job_->ChangeRequestPriority(this, priority);
2616 } 2616 }
2617 2617
2618 } // namespace net 2618 } // namespace net
OLDNEW
« no previous file with comments | « net/dns/dns_socket_pool.cc ('k') | net/dns/mdns_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698