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

Unified Diff: content/child/url_response_body_consumer.cc

Issue 2459483002: [Mojo-Loading] Dispatch body data after response is received (Closed)
Patch Set: fix Created 4 years, 2 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 6874b5053a77b1b5b70d69294da7257ef86790e3..5016ee3a5b6c0646e383d43c26b745bbcdd6c816 100644
--- a/content/child/url_response_body_consumer.cc
+++ b/content/child/url_response_body_consumer.cc
@@ -49,7 +49,13 @@ URLResponseBodyConsumer::URLResponseBodyConsumer(
resource_dispatcher_(resource_dispatcher),
handle_(std::move(handle)),
handle_watcher_(task_runner),
- has_seen_end_of_data_(!handle_.is_valid()) {
+ has_seen_end_of_data_(!handle_.is_valid()) {}
+
+URLResponseBodyConsumer::~URLResponseBodyConsumer() {}
+
+void URLResponseBodyConsumer::Start(base::SingleThreadTaskRunner* task_runner) {
+ if (has_been_cancelled_)
+ return;
handle_watcher_.Start(
handle_.get(), MOJO_HANDLE_SIGNAL_READABLE,
base::Bind(&URLResponseBodyConsumer::OnReadable, base::Unretained(this)));
@@ -58,8 +64,6 @@ URLResponseBodyConsumer::URLResponseBodyConsumer(
MOJO_RESULT_OK));
}
-URLResponseBodyConsumer::~URLResponseBodyConsumer() {}
-
void URLResponseBodyConsumer::OnComplete(
const ResourceRequestCompletionStatus& status) {
if (has_been_cancelled_)
« 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