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

Side by Side Diff: net/proxy/mojo_proxy_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/proxy/mojo_proxy_resolver_factory_impl.cc ('k') | net/proxy/proxy_bypass_rules.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 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/proxy/mojo_proxy_resolver_impl.h" 5 #include "net/proxy/mojo_proxy_resolver_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 bool done_; 44 bool done_;
45 45
46 DISALLOW_COPY_AND_ASSIGN(Job); 46 DISALLOW_COPY_AND_ASSIGN(Job);
47 }; 47 };
48 48
49 MojoProxyResolverImpl::MojoProxyResolverImpl( 49 MojoProxyResolverImpl::MojoProxyResolverImpl(
50 std::unique_ptr<ProxyResolverV8Tracing> resolver) 50 std::unique_ptr<ProxyResolverV8Tracing> resolver)
51 : resolver_(std::move(resolver)) {} 51 : resolver_(std::move(resolver)) {}
52 52
53 MojoProxyResolverImpl::~MojoProxyResolverImpl() { 53 MojoProxyResolverImpl::~MojoProxyResolverImpl() {
54 STLDeleteElements(&resolve_jobs_); 54 base::STLDeleteElements(&resolve_jobs_);
55 } 55 }
56 56
57 void MojoProxyResolverImpl::GetProxyForUrl( 57 void MojoProxyResolverImpl::GetProxyForUrl(
58 const GURL& url, 58 const GURL& url,
59 interfaces::ProxyResolverRequestClientPtr client) { 59 interfaces::ProxyResolverRequestClientPtr client) {
60 DVLOG(1) << "GetProxyForUrl(" << url << ")"; 60 DVLOG(1) << "GetProxyForUrl(" << url << ")";
61 Job* job = new Job(std::move(client), this, url); 61 Job* job = new Job(std::move(client), this, url);
62 bool inserted = resolve_jobs_.insert(job).second; 62 bool inserted = resolve_jobs_.insert(job).second;
63 DCHECK(inserted); 63 DCHECK(inserted);
64 job->Start(); 64 job->Start();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 } 109 }
110 client_->ReportResult(error, std::move(result)); 110 client_->ReportResult(error, std::move(result));
111 resolver_->DeleteJob(this); 111 resolver_->DeleteJob(this);
112 } 112 }
113 113
114 void MojoProxyResolverImpl::Job::OnConnectionError() { 114 void MojoProxyResolverImpl::Job::OnConnectionError() {
115 resolver_->DeleteJob(this); 115 resolver_->DeleteJob(this);
116 } 116 }
117 117
118 } // namespace net 118 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/mojo_proxy_resolver_factory_impl.cc ('k') | net/proxy/proxy_bypass_rules.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698