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

Unified Diff: content/browser/streams/stream.cc

Issue 2368913002: Fix stream errors that occur after a stream starts not propagating. (Closed)
Patch Set: review comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/streams/stream.h ('k') | content/browser/streams/stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/streams/stream.cc
diff --git a/content/browser/streams/stream.cc b/content/browser/streams/stream.cc
index d4e772755c61f815ed2e78546a4b13cf96eb430f..1714876b890c8d7194cba0f5fdeae36b148792e1 100644
--- a/content/browser/streams/stream.cc
+++ b/content/browser/streams/stream.cc
@@ -118,11 +118,11 @@ void Stream::Flush() {
writer_->Flush();
}
-void Stream::Finalize() {
+void Stream::Finalize(int status) {
if (!writer_.get())
return;
- writer_->Close(0);
+ writer_->Close(status);
writer_.reset();
// Continue asynchronously.
@@ -187,6 +187,10 @@ void Stream::CloseHandle() {
write_observer_->OnClose(this);
}
+int Stream::GetStatus() {
+ return reader_->GetStatus();
+}
+
void Stream::OnSpaceAvailable() {
can_add_data_ = true;
if (write_observer_)
« no previous file with comments | « content/browser/streams/stream.h ('k') | content/browser/streams/stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698