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

Unified Diff: content/child/url_response_body_consumer.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, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/child/url_response_body_consumer.h ('k') | content/child/url_response_body_consumer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/url_response_body_consumer.cc
diff --git a/content/child/url_response_body_consumer.cc b/content/child/url_response_body_consumer.cc
index 44b130028cab45385386599d6dca084f6a3f4fd5..9db1e6e6718b137f8cb304c14098583e4cbb69c0 100644
--- a/content/child/url_response_body_consumer.cc
+++ b/content/child/url_response_body_consumer.cc
@@ -44,10 +44,11 @@ URLResponseBodyConsumer::URLResponseBodyConsumer(
int request_id,
ResourceDispatcher* resource_dispatcher,
mojo::ScopedDataPipeConsumerHandle handle,
- base::SingleThreadTaskRunner* task_runner)
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner)
: request_id_(request_id),
resource_dispatcher_(resource_dispatcher),
handle_(std::move(handle)),
+ handle_watcher_(task_runner),
has_seen_end_of_data_(!handle_.is_valid()) {
handle_watcher_.Start(
handle_.get(), MOJO_HANDLE_SIGNAL_READABLE,
@@ -83,7 +84,6 @@ void URLResponseBodyConsumer::OnReadable(MojoResult unused) {
return;
// TODO(yhirano): Suppress notification when deferred.
- // TODO(yhirano): Run this operation on the loading task runner.
while (!has_been_cancelled_) {
const void* buffer = nullptr;
uint32_t available = 0;
« no previous file with comments | « content/child/url_response_body_consumer.h ('k') | content/child/url_response_body_consumer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698