| Index: content/browser/streams/stream_registry.h
|
| diff --git a/content/browser/streams/stream_registry.h b/content/browser/streams/stream_registry.h
|
| index ce7f6b15bcb7b957a2105101282863408b3a1b22..eac067181245cd1b303465e1d869bdb79265dae2 100644
|
| --- a/content/browser/streams/stream_registry.h
|
| +++ b/content/browser/streams/stream_registry.h
|
| @@ -25,7 +25,7 @@ class CONTENT_EXPORT StreamRegistry : public base::NonThreadSafe {
|
| virtual ~StreamRegistry();
|
|
|
| // Registers a stream, and sets its URL.
|
| - void RegisterStream(scoped_refptr<Stream> stream);
|
| + void RegisterStream(Stream* stream);
|
|
|
| // Clones a stream. Returns true on success, or false if |src_url| doesn't
|
| // exist.
|
| @@ -53,11 +53,17 @@ class CONTENT_EXPORT StreamRegistry : public base::NonThreadSafe {
|
| void SetRegisterObserver(const GURL& url, StreamRegisterObserver* observer);
|
| void RemoveRegisterObserver(const GURL& url);
|
|
|
| + // If the reader is aborted before the stream is registered, call this method
|
| + // to reduce the memory consumption. After this method is called,
|
| + // RegisterStream doesn't register the stream of the URL.
|
| + void NotifyReaderAbortedBeforeRegistration(const GURL& url);
|
| +
|
| private:
|
| typedef std::map<GURL, scoped_refptr<Stream> > StreamMap;
|
|
|
| StreamMap streams_;
|
| std::map<GURL, StreamRegisterObserver*> register_observers_;
|
| + std::set<GURL> reader_aborted_urls_;
|
|
|
| size_t total_memory_usage_;
|
|
|
|
|