OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |