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

Side by Side Diff: components/cronet/android/url_request_context_adapter.cc

Issue 2257793002: 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/cronet/android/url_request_context_adapter.h" 5 #include "components/cronet/android/url_request_context_adapter.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <limits> 10 #include <limits>
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 this)); 146 this));
147 } 147 }
148 148
149 void URLRequestContextAdapter::InitRequestContextOnNetworkThread() { 149 void URLRequestContextAdapter::InitRequestContextOnNetworkThread() {
150 DCHECK(GetNetworkTaskRunner()->BelongsToCurrentThread()); 150 DCHECK(GetNetworkTaskRunner()->BelongsToCurrentThread());
151 DCHECK(config_); 151 DCHECK(config_);
152 // TODO(mmenke): Add method to have the builder enable SPDY. 152 // TODO(mmenke): Add method to have the builder enable SPDY.
153 net::URLRequestContextBuilder context_builder; 153 net::URLRequestContextBuilder context_builder;
154 154
155 context_builder.set_network_delegate( 155 context_builder.set_network_delegate(
156 base::WrapUnique(new BasicNetworkDelegate())); 156 base::MakeUnique<BasicNetworkDelegate>());
157 context_builder.set_proxy_config_service(std::move(proxy_config_service_)); 157 context_builder.set_proxy_config_service(std::move(proxy_config_service_));
158 config_->ConfigureURLRequestContextBuilder(&context_builder, 158 config_->ConfigureURLRequestContextBuilder(&context_builder,
159 g_net_log.Pointer(), nullptr); 159 g_net_log.Pointer(), nullptr);
160 160
161 context_ = context_builder.Build(); 161 context_ = context_builder.Build();
162 162
163 if (config_->enable_sdch) { 163 if (config_->enable_sdch) {
164 DCHECK(context_->sdch_manager()); 164 DCHECK(context_->sdch_manager());
165 sdch_owner_.reset( 165 sdch_owner_.reset(
166 new net::SdchOwner(context_->sdch_manager(), context_.get())); 166 new net::SdchOwner(context_->sdch_manager(), context_.get()));
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 write_to_file_observer_.reset(); 314 write_to_file_observer_.reset();
315 } 315 }
316 } 316 }
317 317
318 void NetLogObserver::OnAddEntry(const net::NetLog::Entry& entry) { 318 void NetLogObserver::OnAddEntry(const net::NetLog::Entry& entry) {
319 VLOG(2) << "Net log entry: type=" << entry.type() 319 VLOG(2) << "Net log entry: type=" << entry.type()
320 << ", source=" << entry.source().type << ", phase=" << entry.phase(); 320 << ", source=" << entry.source().type << ", phase=" << entry.phase();
321 } 321 }
322 322
323 } // namespace cronet 323 } // namespace cronet
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698