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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
143 | 143 |
144 void URLRequestContextAdapter::InitRequestContextOnNetworkThread() { | 144 void URLRequestContextAdapter::InitRequestContextOnNetworkThread() { |
145 DCHECK(GetNetworkTaskRunner()->BelongsToCurrentThread()); | 145 DCHECK(GetNetworkTaskRunner()->BelongsToCurrentThread()); |
146 DCHECK(config_); | 146 DCHECK(config_); |
147 // TODO(mmenke): Add method to have the builder enable SPDY. | 147 // TODO(mmenke): Add method to have the builder enable SPDY. |
148 net::URLRequestContextBuilder context_builder; | 148 net::URLRequestContextBuilder context_builder; |
149 | 149 |
150 context_builder.set_network_delegate( | 150 context_builder.set_network_delegate( |
151 base::WrapUnique(new BasicNetworkDelegate())); | 151 base::WrapUnique(new BasicNetworkDelegate())); |
152 context_builder.set_proxy_config_service(std::move(proxy_config_service_)); | 152 context_builder.set_proxy_config_service(std::move(proxy_config_service_)); |
153 config_->ConfigureURLRequestContextBuilder(&context_builder, nullptr, | 153 config_->ConfigureURLRequestContextBuilder(&context_builder, |
154 nullptr); | 154 new net::NetLog(), nullptr); |
pauljensen
2016/06/10 14:19:37
looks like a leak
mgersh
2016/06/29 17:43:31
Added a global netlog similar to the one in cronet
| |
155 | 155 |
156 context_ = context_builder.Build(); | 156 context_ = context_builder.Build(); |
157 | 157 |
158 if (config_->enable_sdch) { | 158 if (config_->enable_sdch) { |
159 DCHECK(context_->sdch_manager()); | 159 DCHECK(context_->sdch_manager()); |
160 sdch_owner_.reset( | 160 sdch_owner_.reset( |
161 new net::SdchOwner(context_->sdch_manager(), context_.get())); | 161 new net::SdchOwner(context_->sdch_manager(), context_.get())); |
162 } | 162 } |
163 | 163 |
164 if (config_->enable_quic) { | 164 if (config_->enable_quic) { |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
309 write_to_file_observer_.reset(); | 309 write_to_file_observer_.reset(); |
310 } | 310 } |
311 } | 311 } |
312 | 312 |
313 void NetLogObserver::OnAddEntry(const net::NetLog::Entry& entry) { | 313 void NetLogObserver::OnAddEntry(const net::NetLog::Entry& entry) { |
314 VLOG(2) << "Net log entry: type=" << entry.type() | 314 VLOG(2) << "Net log entry: type=" << entry.type() |
315 << ", source=" << entry.source().type << ", phase=" << entry.phase(); | 315 << ", source=" << entry.source().type << ", phase=" << entry.phase(); |
316 } | 316 } |
317 | 317 |
318 } // namespace cronet | 318 } // namespace cronet |
OLD | NEW |