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

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

Issue 2259823002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/mock_proxy_resolver.h" 5 #include "net/proxy/mock_proxy_resolver.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 scoped_refptr<MockAsyncProxyResolverFactory::Request> keep_alive(this); 88 scoped_refptr<MockAsyncProxyResolverFactory::Request> keep_alive(this);
89 factory_->RemovePendingRequest(this); 89 factory_->RemovePendingRequest(this);
90 factory_ = nullptr; 90 factory_ = nullptr;
91 callback_.Run(rv); 91 callback_.Run(rv);
92 } 92 }
93 93
94 void MockAsyncProxyResolverFactory::Request::CompleteNowWithForwarder( 94 void MockAsyncProxyResolverFactory::Request::CompleteNowWithForwarder(
95 int rv, 95 int rv,
96 ProxyResolver* resolver) { 96 ProxyResolver* resolver) {
97 DCHECK(resolver); 97 DCHECK(resolver);
98 CompleteNow(rv, base::WrapUnique(new ForwardingProxyResolver(resolver))); 98 CompleteNow(rv, base::MakeUnique<ForwardingProxyResolver>(resolver));
99 } 99 }
100 100
101 void MockAsyncProxyResolverFactory::Request::FactoryDestroyed() { 101 void MockAsyncProxyResolverFactory::Request::FactoryDestroyed() {
102 factory_ = nullptr; 102 factory_ = nullptr;
103 } 103 }
104 104
105 class MockAsyncProxyResolverFactory::Job 105 class MockAsyncProxyResolverFactory::Job
106 : public ProxyResolverFactory::Request { 106 : public ProxyResolverFactory::Request {
107 public: 107 public:
108 explicit Job( 108 explicit Job(
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 void ForwardingProxyResolver::CancelRequest(RequestHandle request) { 167 void ForwardingProxyResolver::CancelRequest(RequestHandle request) {
168 impl_->CancelRequest(request); 168 impl_->CancelRequest(request);
169 } 169 }
170 170
171 LoadState ForwardingProxyResolver::GetLoadState(RequestHandle request) const { 171 LoadState ForwardingProxyResolver::GetLoadState(RequestHandle request) const {
172 return impl_->GetLoadState(request); 172 return impl_->GetLoadState(request);
173 } 173 }
174 174
175 } // namespace net 175 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/dhcp_proxy_script_fetcher_factory.cc ('k') | net/proxy/mojo_proxy_resolver_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698