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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 net::URLRequestContext* URLRequestContextAdapter::GetURLRequestContext() { | 259 net::URLRequestContext* URLRequestContextAdapter::GetURLRequestContext() { |
260 DCHECK(GetNetworkTaskRunner()->BelongsToCurrentThread()); | 260 DCHECK(GetNetworkTaskRunner()->BelongsToCurrentThread()); |
261 if (!context_) { | 261 if (!context_) { |
262 LOG(ERROR) << "URLRequestContext is not set up"; | 262 LOG(ERROR) << "URLRequestContext is not set up"; |
263 } | 263 } |
264 return context_.get(); | 264 return context_.get(); |
265 } | 265 } |
266 | 266 |
267 scoped_refptr<base::SingleThreadTaskRunner> | 267 scoped_refptr<base::SingleThreadTaskRunner> |
268 URLRequestContextAdapter::GetNetworkTaskRunner() const { | 268 URLRequestContextAdapter::GetNetworkTaskRunner() const { |
269 return network_thread_->message_loop_proxy(); | 269 return network_thread_->task_runner(); |
270 } | 270 } |
271 | 271 |
272 void URLRequestContextAdapter::StartNetLogToFile(const std::string& file_name, | 272 void URLRequestContextAdapter::StartNetLogToFile(const std::string& file_name, |
273 bool log_all) { | 273 bool log_all) { |
274 PostTaskToNetworkThread( | 274 PostTaskToNetworkThread( |
275 FROM_HERE, | 275 FROM_HERE, |
276 base::Bind(&URLRequestContextAdapter::StartNetLogToFileHelper, this, | 276 base::Bind(&URLRequestContextAdapter::StartNetLogToFileHelper, this, |
277 file_name, log_all)); | 277 file_name, log_all)); |
278 } | 278 } |
279 | 279 |
(...skipping 30 matching lines...) Expand all Loading... |
310 write_to_file_observer_.reset(); | 310 write_to_file_observer_.reset(); |
311 } | 311 } |
312 } | 312 } |
313 | 313 |
314 void NetLogObserver::OnAddEntry(const net::NetLog::Entry& entry) { | 314 void NetLogObserver::OnAddEntry(const net::NetLog::Entry& entry) { |
315 VLOG(2) << "Net log entry: type=" << entry.type() | 315 VLOG(2) << "Net log entry: type=" << entry.type() |
316 << ", source=" << entry.source().type << ", phase=" << entry.phase(); | 316 << ", source=" << entry.source().type << ", phase=" << entry.phase(); |
317 } | 317 } |
318 | 318 |
319 } // namespace cronet | 319 } // namespace cronet |
OLD | NEW |