| 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_peer.h" | 5 #include "components/cronet/android/url_request_context_peer.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "components/cronet/url_request_context_config.h" | 10 #include "components/cronet/url_request_context_config.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate); | 108 DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate); |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 } // namespace | 111 } // namespace |
| 112 | 112 |
| 113 namespace cronet { | 113 namespace cronet { |
| 114 | 114 |
| 115 URLRequestContextPeer::URLRequestContextPeer( | 115 URLRequestContextPeer::URLRequestContextPeer( |
| 116 URLRequestContextPeerDelegate* delegate, | 116 URLRequestContextPeerDelegate* delegate, |
| 117 std::string user_agent, | 117 std::string user_agent, |
| 118 int logging_level, | 118 int logging_level) { |
| 119 const char* version) { | |
| 120 delegate_ = delegate; | 119 delegate_ = delegate; |
| 121 user_agent_ = user_agent; | 120 user_agent_ = user_agent; |
| 122 logging_level_ = logging_level; | 121 logging_level_ = logging_level; |
| 123 version_ = version; | |
| 124 } | 122 } |
| 125 | 123 |
| 126 void URLRequestContextPeer::Initialize( | 124 void URLRequestContextPeer::Initialize( |
| 127 scoped_ptr<URLRequestContextConfig> config) { | 125 scoped_ptr<URLRequestContextConfig> config) { |
| 128 network_thread_ = new base::Thread("network"); | 126 network_thread_ = new base::Thread("network"); |
| 129 base::Thread::Options options; | 127 base::Thread::Options options; |
| 130 options.message_loop_type = base::MessageLoop::TYPE_IO; | 128 options.message_loop_type = base::MessageLoop::TYPE_IO; |
| 131 network_thread_->StartWithOptions(options); | 129 network_thread_->StartWithOptions(options); |
| 132 | 130 |
| 133 GetNetworkTaskRunner()->PostTask( | 131 GetNetworkTaskRunner()->PostTask( |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 | 204 |
| 207 void NetLogObserver::OnAddEntry(const net::NetLog::Entry& entry) { | 205 void NetLogObserver::OnAddEntry(const net::NetLog::Entry& entry) { |
| 208 if (VLOG_IS_ON(2)) { | 206 if (VLOG_IS_ON(2)) { |
| 209 VLOG(2) << "Net log entry: type=" << entry.type() | 207 VLOG(2) << "Net log entry: type=" << entry.type() |
| 210 << ", source=" << entry.source().type | 208 << ", source=" << entry.source().type |
| 211 << ", phase=" << entry.phase(); | 209 << ", phase=" << entry.phase(); |
| 212 } | 210 } |
| 213 } | 211 } |
| 214 | 212 |
| 215 } // namespace cronet | 213 } // namespace cronet |
| OLD | NEW |