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

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

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
Index: content/browser/streams/stream.h
diff --git a/content/browser/streams/stream.h b/content/browser/streams/stream.h
index 1422da5ef248c656854b1bf0e6d57e1c56057474..44f9a8f53d89dd7ce42fb653d1bf60e0e8fd1aab 100644
--- a/content/browser/streams/stream.h
+++ b/content/browser/streams/stream.h
@@ -74,7 +74,7 @@ class CONTENT_EXPORT Stream : public base::RefCountedThreadSafe<Stream> {
void Flush();
// Notifies this stream that it will not be receiving any more data.
- void Finalize();
+ void Finalize(int status);
// Reads a maximum of |buf_size| from the stream into |buf|. Sets
// |*bytes_read| to the number of bytes actually read.
@@ -85,6 +85,10 @@ class CONTENT_EXPORT Stream : public base::RefCountedThreadSafe<Stream> {
std::unique_ptr<StreamHandle> CreateHandle();
void CloseHandle();
+ // Returns the status of the stream. This is either an error code that
+ // occurred while reading, or the status that was set in Finalize above.
+ int GetStatus();
+
// Indicates whether there is space in the buffer to add more data.
bool can_add_data() const { return can_add_data_; }
« no previous file with comments | « content/browser/service_worker/service_worker_url_request_job_unittest.cc ('k') | content/browser/streams/stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698