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

Unified Diff: content/child/url_response_body_consumer.cc

Issue 2633123002: [Mojo-Loading] OnStartLoadingResponseBody should be called after OnReceiveResponse (Closed)
Patch Set: fix Created 3 years, 11 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 5014eeb1ed6eb81443d4ba6642c5827f32e2b912..398ea85b19dd0b8a7abee23d5cd06dd880dfc261 100644
--- a/content/child/url_response_body_consumer.cc
+++ b/content/child/url_response_body_consumer.cc
@@ -47,13 +47,7 @@ URLResponseBodyConsumer::URLResponseBodyConsumer(
handle_(std::move(handle)),
handle_watcher_(task_runner),
task_runner_(task_runner),
- has_seen_end_of_data_(!handle_.is_valid()) {}
-
-URLResponseBodyConsumer::~URLResponseBodyConsumer() {}
-
-void URLResponseBodyConsumer::Start() {
- 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)));
@@ -62,6 +56,8 @@ void URLResponseBodyConsumer::Start() {
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