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 <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 void URLRequestContextAdapter::Initialize( | 122 void URLRequestContextAdapter::Initialize( |
123 scoped_ptr<URLRequestContextConfig> config) { | 123 scoped_ptr<URLRequestContextConfig> config) { |
124 network_thread_ = new base::Thread("network"); | 124 network_thread_ = new base::Thread("network"); |
125 base::Thread::Options options; | 125 base::Thread::Options options; |
126 options.message_loop_type = base::MessageLoop::TYPE_IO; | 126 options.message_loop_type = base::MessageLoop::TYPE_IO; |
127 network_thread_->StartWithOptions(options); | 127 network_thread_->StartWithOptions(options); |
128 config_ = config.Pass(); | 128 config_ = config.Pass(); |
129 } | 129 } |
130 | 130 |
131 void URLRequestContextAdapter::InitRequestContextOnMainThread() { | 131 void URLRequestContextAdapter::InitRequestContextOnMainThread() { |
132 proxy_config_service_.reset(net::ProxyService::CreateSystemProxyConfigService( | 132 proxy_config_service_ = net::ProxyService::CreateSystemProxyConfigService( |
133 GetNetworkTaskRunner(), NULL)); | 133 GetNetworkTaskRunner(), NULL); |
134 GetNetworkTaskRunner()->PostTask( | 134 GetNetworkTaskRunner()->PostTask( |
135 FROM_HERE, | 135 FROM_HERE, |
136 base::Bind(&URLRequestContextAdapter::InitRequestContextOnNetworkThread, | 136 base::Bind(&URLRequestContextAdapter::InitRequestContextOnNetworkThread, |
137 this)); | 137 this)); |
138 } | 138 } |
139 | 139 |
140 void URLRequestContextAdapter::InitRequestContextOnNetworkThread() { | 140 void URLRequestContextAdapter::InitRequestContextOnNetworkThread() { |
141 DCHECK(GetNetworkTaskRunner()->BelongsToCurrentThread()); | 141 DCHECK(GetNetworkTaskRunner()->BelongsToCurrentThread()); |
142 DCHECK(config_); | 142 DCHECK(config_); |
143 // TODO(mmenke): Add method to have the builder enable SPDY. | 143 // TODO(mmenke): Add method to have the builder enable SPDY. |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 write_to_file_observer_.reset(); | 307 write_to_file_observer_.reset(); |
308 } | 308 } |
309 } | 309 } |
310 | 310 |
311 void NetLogObserver::OnAddEntry(const net::NetLog::Entry& entry) { | 311 void NetLogObserver::OnAddEntry(const net::NetLog::Entry& entry) { |
312 VLOG(2) << "Net log entry: type=" << entry.type() | 312 VLOG(2) << "Net log entry: type=" << entry.type() |
313 << ", source=" << entry.source().type << ", phase=" << entry.phase(); | 313 << ", source=" << entry.source().type << ", phase=" << entry.phase(); |
314 } | 314 } |
315 | 315 |
316 } // namespace cronet | 316 } // namespace cronet |
OLD | NEW |