Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: components/cronet/android/url_request_context_adapter.cc

Issue 1144153004: components: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698