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

Side by Side Diff: net/proxy/multi_threaded_proxy_resolver.cc

Issue 2101863004: net: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/log/net_log_util.cc ('k') | net/proxy/proxy_resolver_v8_tracing.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/proxy/multi_threaded_proxy_resolver.h" 5 #include "net/proxy/multi_threaded_proxy_resolver.h"
6 6
7 #include <deque> 7 #include <deque>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 599
600 MultiThreadedProxyResolverFactory::MultiThreadedProxyResolverFactory( 600 MultiThreadedProxyResolverFactory::MultiThreadedProxyResolverFactory(
601 size_t max_num_threads, 601 size_t max_num_threads,
602 bool factory_expects_bytes) 602 bool factory_expects_bytes)
603 : ProxyResolverFactory(factory_expects_bytes), 603 : ProxyResolverFactory(factory_expects_bytes),
604 max_num_threads_(max_num_threads) { 604 max_num_threads_(max_num_threads) {
605 DCHECK_GE(max_num_threads, 1u); 605 DCHECK_GE(max_num_threads, 1u);
606 } 606 }
607 607
608 MultiThreadedProxyResolverFactory::~MultiThreadedProxyResolverFactory() { 608 MultiThreadedProxyResolverFactory::~MultiThreadedProxyResolverFactory() {
609 for (auto job : jobs_) { 609 for (auto* job : jobs_) {
610 job->FactoryDestroyed(); 610 job->FactoryDestroyed();
611 } 611 }
612 } 612 }
613 613
614 int MultiThreadedProxyResolverFactory::CreateProxyResolver( 614 int MultiThreadedProxyResolverFactory::CreateProxyResolver(
615 const scoped_refptr<ProxyResolverScriptData>& pac_script, 615 const scoped_refptr<ProxyResolverScriptData>& pac_script,
616 std::unique_ptr<ProxyResolver>* resolver, 616 std::unique_ptr<ProxyResolver>* resolver,
617 const CompletionCallback& callback, 617 const CompletionCallback& callback,
618 std::unique_ptr<Request>* request) { 618 std::unique_ptr<Request>* request) {
619 std::unique_ptr<Job> job(new Job(this, pac_script, resolver, 619 std::unique_ptr<Job> job(new Job(this, pac_script, resolver,
620 CreateProxyResolverFactory(), 620 CreateProxyResolverFactory(),
621 max_num_threads_, callback)); 621 max_num_threads_, callback));
622 jobs_.insert(job.get()); 622 jobs_.insert(job.get());
623 *request = std::move(job); 623 *request = std::move(job);
624 return ERR_IO_PENDING; 624 return ERR_IO_PENDING;
625 } 625 }
626 626
627 void MultiThreadedProxyResolverFactory::RemoveJob( 627 void MultiThreadedProxyResolverFactory::RemoveJob(
628 MultiThreadedProxyResolverFactory::Job* job) { 628 MultiThreadedProxyResolverFactory::Job* job) {
629 size_t erased = jobs_.erase(job); 629 size_t erased = jobs_.erase(job);
630 DCHECK_EQ(1u, erased); 630 DCHECK_EQ(1u, erased);
631 } 631 }
632 632
633 } // namespace net 633 } // namespace net
OLDNEW
« no previous file with comments | « net/log/net_log_util.cc ('k') | net/proxy/proxy_resolver_v8_tracing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698