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

Side by Side Diff: net/tools/quic/synchronous_host_resolver.cc

Issue 1893083002: Change scoped_ptr to std::unique_ptr in //net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-net-all: iwyu Created 4 years, 8 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 (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/tools/quic/synchronous_host_resolver.h" 5 #include "net/tools/quic/synchronous_host_resolver.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 ResolverThread::~ResolverThread() {} 53 ResolverThread::~ResolverThread() {}
54 54
55 void ResolverThread::Run() { 55 void ResolverThread::Run() {
56 base::MessageLoopForIO loop; 56 base::MessageLoopForIO loop;
57 57
58 net::NetLog net_log; 58 net::NetLog net_log;
59 net::HostResolver::Options options; 59 net::HostResolver::Options options;
60 options.max_concurrent_resolves = 6; 60 options.max_concurrent_resolves = 6;
61 options.max_retry_attempts = 3u; 61 options.max_retry_attempts = 3u;
62 scoped_ptr<net::HostResolverImpl> resolver_impl( 62 std::unique_ptr<net::HostResolverImpl> resolver_impl(
63 new net::HostResolverImpl(options, &net_log)); 63 new net::HostResolverImpl(options, &net_log));
64 SingleRequestHostResolver resolver(resolver_impl.get()); 64 SingleRequestHostResolver resolver(resolver_impl.get());
65 65
66 HostPortPair host_port_pair(host_, 80); 66 HostPortPair host_port_pair(host_, 80);
67 rv_ = resolver.Resolve(HostResolver::RequestInfo(host_port_pair), 67 rv_ = resolver.Resolve(HostResolver::RequestInfo(host_port_pair),
68 DEFAULT_PRIORITY, addresses_, 68 DEFAULT_PRIORITY, addresses_,
69 base::Bind(&ResolverThread::OnResolutionComplete, 69 base::Bind(&ResolverThread::OnResolutionComplete,
70 weak_factory_.GetWeakPtr()), 70 weak_factory_.GetWeakPtr()),
71 BoundNetLog()); 71 BoundNetLog());
72 72
(...skipping 21 matching lines...) Expand all
94 } // namespace 94 } // namespace
95 95
96 // static 96 // static
97 int SynchronousHostResolver::Resolve(const std::string& host, 97 int SynchronousHostResolver::Resolve(const std::string& host,
98 AddressList* addresses) { 98 AddressList* addresses) {
99 ResolverThread resolver; 99 ResolverThread resolver;
100 return resolver.Resolve(host, addresses); 100 return resolver.Resolve(host, addresses);
101 } 101 }
102 102
103 } // namespace net 103 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/spdy_balsa_utils.cc ('k') | net/tools/quic/test_tools/packet_dropping_test_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698