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

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

Issue 2274833002: Teach mojo::Watcher in URLResponseBodyConsumer the correct task runner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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 | « no previous file | content/child/url_response_body_consumer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "content/child/resource_dispatcher.h" 7 #include "content/child/resource_dispatcher.h"
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 void OnReceiveResponse(const ResourceResponseHead& response_head) override { 92 void OnReceiveResponse(const ResourceResponseHead& response_head) override {
93 resource_dispatcher_->OnMessageReceived( 93 resource_dispatcher_->OnMessageReceived(
94 ResourceMsg_ReceivedResponse(request_id_, response_head)); 94 ResourceMsg_ReceivedResponse(request_id_, response_head));
95 } 95 }
96 96
97 void OnStartLoadingResponseBody( 97 void OnStartLoadingResponseBody(
98 mojo::ScopedDataPipeConsumerHandle body) override { 98 mojo::ScopedDataPipeConsumerHandle body) override {
99 DCHECK(!body_consumer_); 99 DCHECK(!body_consumer_);
100 body_consumer_ = new URLResponseBodyConsumer( 100 body_consumer_ = new URLResponseBodyConsumer(
101 request_id_, resource_dispatcher_, std::move(body), task_runner_.get()); 101 request_id_, resource_dispatcher_, std::move(body), task_runner_);
102 } 102 }
103 103
104 void OnComplete(const ResourceRequestCompletionStatus& status) override { 104 void OnComplete(const ResourceRequestCompletionStatus& status) override {
105 body_consumer_->OnComplete(status); 105 body_consumer_->OnComplete(status);
106 } 106 }
107 107
108 mojom::URLLoaderClientPtr CreateInterfacePtrAndBind() { 108 mojom::URLLoaderClientPtr CreateInterfacePtrAndBind() {
109 return binding_.CreateInterfacePtrAndBind(); 109 return binding_.CreateInterfacePtrAndBind();
110 } 110 }
111 111
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 *frame_origin = extra_data->frame_origin(); 875 *frame_origin = extra_data->frame_origin();
876 return request; 876 return request;
877 } 877 }
878 878
879 void ResourceDispatcher::SetResourceSchedulingFilter( 879 void ResourceDispatcher::SetResourceSchedulingFilter(
880 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter) { 880 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter) {
881 resource_scheduling_filter_ = resource_scheduling_filter; 881 resource_scheduling_filter_ = resource_scheduling_filter;
882 } 882 }
883 883
884 } // namespace content 884 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/child/url_response_body_consumer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698