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

Side by Side Diff: content/child/url_loader_client_impl.cc

Issue 2717523004: Revert of Use the loading task runner for mojo-loading (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « content/child/resource_dispatcher.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "content/child/url_loader_client_impl.h" 5 #include "content/child/url_loader_client_impl.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "content/child/resource_dispatcher.h" 9 #include "content/child/resource_dispatcher.h"
10 #include "content/child/url_response_body_consumer.h" 10 #include "content/child/url_response_body_consumer.h"
(...skipping 12 matching lines...) Expand all
23 task_runner_(std::move(task_runner)), 23 task_runner_(std::move(task_runner)),
24 weak_factory_(this) {} 24 weak_factory_(this) {}
25 25
26 URLLoaderClientImpl::~URLLoaderClientImpl() { 26 URLLoaderClientImpl::~URLLoaderClientImpl() {
27 if (body_consumer_) 27 if (body_consumer_)
28 body_consumer_->Cancel(); 28 body_consumer_->Cancel();
29 } 29 }
30 30
31 void URLLoaderClientImpl::Bind( 31 void URLLoaderClientImpl::Bind(
32 mojom::URLLoaderClientAssociatedPtrInfo* client_ptr_info) { 32 mojom::URLLoaderClientAssociatedPtrInfo* client_ptr_info) {
33 binding_.Bind(client_ptr_info, task_runner_.get()); 33 binding_.Bind(client_ptr_info);
34 } 34 }
35 35
36 void URLLoaderClientImpl::SetDefersLoading() { 36 void URLLoaderClientImpl::SetDefersLoading() {
37 is_deferred_ = true; 37 is_deferred_ = true;
38 if (body_consumer_) 38 if (body_consumer_)
39 body_consumer_->SetDefersLoading(); 39 body_consumer_->SetDefersLoading();
40 } 40 }
41 41
42 void URLLoaderClientImpl::UnsetDefersLoading() { 42 void URLLoaderClientImpl::UnsetDefersLoading() {
43 is_deferred_ = false; 43 is_deferred_ = false;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 void URLLoaderClientImpl::OnUploadProgress(int64_t current_position, 179 void URLLoaderClientImpl::OnUploadProgress(int64_t current_position,
180 int64_t total_size, 180 int64_t total_size,
181 const base::Closure& ack_callback) { 181 const base::Closure& ack_callback) {
182 Dispatch( 182 Dispatch(
183 ResourceMsg_UploadProgress(request_id_, current_position, total_size)); 183 ResourceMsg_UploadProgress(request_id_, current_position, total_size));
184 ack_callback.Run(); 184 ack_callback.Run();
185 } 185 }
186 186
187 } // namespace content 187 } // namespace content
OLDNEW
« no previous file with comments | « content/child/resource_dispatcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698