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

Unified Diff: content/child/url_response_body_consumer.cc

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