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

Unified Diff: content/browser/byte_stream.h

Issue 22908008: Limit the total memory usage for Stream instances (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: creis's comments Created 7 years, 4 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 | « no previous file | content/browser/byte_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/byte_stream.h
diff --git a/content/browser/byte_stream.h b/content/browser/byte_stream.h
index 0b5640d07112c8ce882dc5cac5c564bf9c6029e1..60b01634c5cb00e7d7dec4f22c2b305abaac7679 100644
--- a/content/browser/byte_stream.h
+++ b/content/browser/byte_stream.h
@@ -153,6 +153,10 @@ class CONTENT_EXPORT ByteStreamWriter {
// or after callbacks may be called).
// The callback will not be called after ByteStreamWriter destruction.
virtual void RegisterCallback(const base::Closure& source_callback) = 0;
+
+ // Returns the number of bytes sent to the reader but not yet reported by
+ // the reader as read.
+ virtual size_t GetTotalBufferedBytes() const = 0;
};
class CONTENT_EXPORT ByteStreamReader {
« no previous file with comments | « no previous file | content/browser/byte_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698