Chromium Code Reviews| Index: content/browser/streams/stream.h |
| diff --git a/content/browser/streams/stream.h b/content/browser/streams/stream.h |
| index 912e4374e6a9e6b49f90d6d14c3384ce71e74401..e3b0240b0fd212425c71b83fd463a52a24c0302b 100644 |
| --- a/content/browser/streams/stream.h |
| +++ b/content/browser/streams/stream.h |
| @@ -38,7 +38,11 @@ class CONTENT_EXPORT Stream : public base::RefCountedThreadSafe<Stream> { |
| STREAM_EMPTY, |
| }; |
| - // Creates a stream useable from the |security_origin|. |
| + // Creates a stream. |
| + // |
| + // TODO(tyoshino): Add |security_origin| parameter back to prevent cross |
| + // origin access to streams inside Chromium (Blink has its own origin checking |
| + // mechanism). |
|
kinuko
2013/07/24 13:11:05
nit: this comment should be added in/after https:/
tyoshino (SeeGerritForStatus)
2013/07/24 13:56:22
ditto. already removed
|
| Stream(StreamRegistry* registry, |
| StreamWriteObserver* write_observer, |
| const GURL& security_origin, |
| @@ -56,6 +60,9 @@ class CONTENT_EXPORT Stream : public base::RefCountedThreadSafe<Stream> { |
| // Adds the data in |buffer| to the stream. Takes ownership of |buffer|. |
| void AddData(scoped_refptr<net::IOBuffer> buffer, size_t size); |
| + // Adds data of |size| at |data| to the stream. This method creates a copy |
| + // of the data, and then passes it to |writer_|. |
| + void AddData(const char* data, size_t size); |
| // Notifies this stream that it will not be receiving any more data. |
| void Finalize(); |
| @@ -75,6 +82,9 @@ class CONTENT_EXPORT Stream : public base::RefCountedThreadSafe<Stream> { |
| const GURL& url() const { return url_; } |
| + // TODO(tyoshino): Once security origin handling inside Chromium is fixed, |
| + // revisit callers of the Stream constructor and fix them if necessary to |
| + // pass right data (e.g. FileAPIMessageFilter). (crbug.com/263342) |
| const GURL& security_origin() const { return security_origin_; } |
| private: |