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

Side by Side Diff: net/dns/mojo_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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/mojo_host_resolver_impl.h" 5 #include "net/dns/mojo_host_resolver_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "net/base/address_list.h" 10 #include "net/base/address_list.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 base::ThreadChecker thread_checker_; 46 base::ThreadChecker thread_checker_;
47 }; 47 };
48 48
49 MojoHostResolverImpl::MojoHostResolverImpl(net::HostResolver* resolver, 49 MojoHostResolverImpl::MojoHostResolverImpl(net::HostResolver* resolver,
50 const BoundNetLog& net_log) 50 const BoundNetLog& net_log)
51 : resolver_(resolver), net_log_(net_log) { 51 : resolver_(resolver), net_log_(net_log) {
52 } 52 }
53 53
54 MojoHostResolverImpl::~MojoHostResolverImpl() { 54 MojoHostResolverImpl::~MojoHostResolverImpl() {
55 DCHECK(thread_checker_.CalledOnValidThread()); 55 DCHECK(thread_checker_.CalledOnValidThread());
56 STLDeleteElements(&pending_jobs_); 56 base::STLDeleteElements(&pending_jobs_);
57 } 57 }
58 58
59 void MojoHostResolverImpl::Resolve( 59 void MojoHostResolverImpl::Resolve(
60 interfaces::HostResolverRequestInfoPtr request_info, 60 interfaces::HostResolverRequestInfoPtr request_info,
61 interfaces::HostResolverRequestClientPtr client) { 61 interfaces::HostResolverRequestClientPtr client) {
62 DCHECK(thread_checker_.CalledOnValidThread()); 62 DCHECK(thread_checker_.CalledOnValidThread());
63 HostResolver::RequestInfo host_request_info = 63 HostResolver::RequestInfo host_request_info =
64 request_info->To<net::HostResolver::RequestInfo>(); 64 request_info->To<net::HostResolver::RequestInfo>();
65 if (host_request_info.is_my_ip_address()) { 65 if (host_request_info.is_my_ip_address()) {
66 // The proxy resolver running inside a sandbox may not be able to get the 66 // The proxy resolver running inside a sandbox may not be able to get the
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 void MojoHostResolverImpl::Job::OnConnectionError() { 131 void MojoHostResolverImpl::Job::OnConnectionError() {
132 DCHECK(thread_checker_.CalledOnValidThread()); 132 DCHECK(thread_checker_.CalledOnValidThread());
133 // |resolver_service_| should always outlive us. 133 // |resolver_service_| should always outlive us.
134 DCHECK(resolver_service_); 134 DCHECK(resolver_service_);
135 DVLOG(1) << "Connection error on request for " 135 DVLOG(1) << "Connection error on request for "
136 << request_info_.host_port_pair().ToString(); 136 << request_info_.host_port_pair().ToString();
137 resolver_service_->DeleteJob(this); 137 resolver_service_->DeleteJob(this);
138 } 138 }
139 139
140 } // namespace net 140 } // namespace net
OLDNEW
« no previous file with comments | « net/dns/mdns_client_impl.cc ('k') | net/extras/sqlite/sqlite_persistent_cookie_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698