summaryrefslogtreecommitdiffstats
path: root/content/browser/streams/stream.cc
Commit message (Collapse)AuthorAgeFilesLines
* Split up streams logic to prepare for PlzNavigate RDH changes.davidben2014-10-151-8/+2
| | | | | | | | | | | | | | | | | This was split out from https://codereview.chromium.org/519533002/ StreamHandle is now split into a StreamHandle and StreamInfo. StreamHandle only manages the stream URL. StreamInfo also contains the headers and other metadata that the streams_private mechanism uses. StreamResourceHandler is also split out into a StreamWriter so other resource handlers may also use it. BUG=376015 Review URL: https://codereview.chromium.org/625993002 Cr-Commit-Position: refs/heads/master@{#299745}
* Change the streamsPrivate extensions API to return HTTP response headers in ↵raymes@chromium.org2014-03-261-1/+3
| | | | | | | | | | | | | | a dictionary This changes from returning the response headers as a raw string to a dictionary mapping header name to header value. If there are multiple headers with the same name, the values are merged in a dictionary and separated by a ", ". BUG=350755 Review URL: https://codereview.chromium.org/198463005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259496 0039d316-1c4b-4281-b951-d872f2087c98
* Pass http response headers to the streamsPrivate API callbackraymes@chromium.org2014-03-071-3/+6
| | | | | | | | | | | | This passes the response headers through to the API callback allowing the application to access the headers without having to make an additional http request. BUG=303491 Review URL: https://codereview.chromium.org/185663002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255593 0039d316-1c4b-4281-b951-d872f2087c98
* Make Stream return STREAM_ABORTED to tell the reader it's failed.tyoshino@chromium.org2013-08-231-8/+17
| | | | | | | | | | | | | | Using this, StreamURLRequestJob aborts itself. For now, this value will be used to deal with memory limit exceed. data_bytes_read_ is moved using this opportunity since it's a part of temporary buffer consists of data_ and data_length_. BUG=169957 Review URL: https://chromiumcodereview.appspot.com/22942003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219170 0039d316-1c4b-4281-b951-d872f2087c98
* Limit the total memory usage for Stream instancestyoshino@chromium.org2013-08-221-2/+35
| | | | | | | | | | | | | | | | Stream instances report their memory usage to StreamRegistry to get approval. If rejected, they unregisters themselves. writer_ and reader_ are cleared immediately when memory usage violation happens. Added task runner DCHECKs to ByteStreamReaderImpl and ByteStreamWriterImpl so that we can check we're not violating thread restriction. BUG=169957 Review URL: https://chromiumcodereview.appspot.com/22908008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218933 0039d316-1c4b-4281-b951-d872f2087c98
* StreamURLRequestJob::OnDataAvailable refactoringtyoshino@chromium.org2013-08-141-0/+3
| | | | | | | | | | | | - Use return value of reader_->Read() call rather than depending on bytes_read - More comments - More DCHECKs BUG= Review URL: https://chromiumcodereview.appspot.com/23025002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217481 0039d316-1c4b-4281-b951-d872f2087c98
* Add Stream support to WebBlobRegistry and FileAPIMessageFilter.tyoshino@chromium.org2013-08-061-0/+6
| | | | | | | | | | | | | | | | Some of existing IPCs and methods for Blob are renamed for readability. Note - raw data sending code in webblobregistry_impl.cc are duplicated intentionally not to bother michaeln's refactoring Bonus: Stopped over-optimization of sharing webkit_blob::BlobData::Item instances in webblobregistry_impl.cc BUG=169957 Review URL: https://chromiumcodereview.appspot.com/15817013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215842 0039d316-1c4b-4281-b951-d872f2087c98
* Make ByteStream independent from DownloadInterruptReasontyoshino@chromium.org2013-08-021-1/+1
| | | | | | | | | | | | | | | Change status type to int to make it portable to other component. After this change, ByteStream could be moved under src/net/base/ or src/base directory. - Comment fix (MaybePostToPeer -> Write) BUG=169957 Review URL: https://chromiumcodereview.appspot.com/18284005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215265 0039d316-1c4b-4281-b951-d872f2087c98
* Remove security_origin member from content::Stream.tyoshino@chromium.org2013-07-261-3/+0
| | | | | | | | | | | | | | | | | | | | Stream::security_origin_ is not used at all for now. There's no established code in Chromium to do origin checking. Security of Blob/Stream resource loading now depends on origin checking mechanism in Blink. Keeping this variable without having any checking mechanism confuses developers. Remove it until we build origin checking code in Chromium. Also, rename security_origin to origin, as it's nothing but an origin URL. BUG=263342 Review URL: https://chromiumcodereview.appspot.com/19798012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213830 0039d316-1c4b-4281-b951-d872f2087c98
* Update includes of message_loop_proxy.brettw@chromium.org2013-06-101-1/+1
| | | | | | | | | | | This keeps the forwarding header, just updates all current callers. BUG= R=avi@chromium.org Review URL: https://codereview.chromium.org/16514006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205306 0039d316-1c4b-4281-b951-d872f2087c98
* Update content/ to use scoped_refptr<T>::get() rather than implicit ↵rsleevi@chromium.org2013-06-021-1/+1
| | | | | | | | | | | | | "operator T*" Linux fixes BUG=110610 TBR=darin Review URL: https://chromiumcodereview.appspot.com/16294003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203624 0039d316-1c4b-4281-b951-d872f2087c98
* content: Remove use of ALLOW_THIS_IN_INITIALIZER_LIST.scherkus@chromium.org2013-04-301-1/+1
| | | | | | | | | | | It's no longer providing value as the MSVC warning is disabled during compilation. Refer to bug for details. BUG=234765 R=jam@chromium.org Review URL: https://codereview.chromium.org/14386012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197206 0039d316-1c4b-4281-b951-d872f2087c98
* Change the Stream Resource Throttle Browsertest into StreamsPrivateApiTestzork@chromium.org2013-04-041-0/+3
| | | | | | | | | BUG=None Review URL: https://chromiumcodereview.appspot.com/12609011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192243 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Stream URL request for async requestszork@chromium.org2013-03-211-7/+12
| | | | | | | | | BUG=222670 Review URL: https://chromiumcodereview.appspot.com/12925003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189597 0039d316-1c4b-4281-b951-d872f2087c98
* Add Resource Handler for creating Streams to forward to extensionszork@chromium.org2013-03-201-1/+26
| | | | | | | | | BUG=171585 Review URL: https://chromiumcodereview.appspot.com/12645004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189172 0039d316-1c4b-4281-b951-d872f2087c98
* Add URL request handling for Streams.zork@chromium.org2013-03-141-1/+2
| | | | | | | | | BUG=181495 Review URL: https://chromiumcodereview.appspot.com/12734003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188075 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r187230: Implement the Stream registry in contentzork@chromium.org2013-03-131-0/+116
| | | | | | | | | | | This fixes the memory leaks introduced by the original CL. BUG=171585 Review URL: https://chromiumcodereview.appspot.com/12637006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187777 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 187230zork@chromium.org2013-03-111-113/+0
| | | | | | | | | | | | | | | | | | | > Implement the Stream registry in content > > This is the first part of the content side of the Streams api. > See: > https://bugs.webkit.org/show_bug.cgi?id=110194 > https://dvcs.w3.org/hg/streams-api/raw-file/tip/Overview.htm > > BUG=171585 > > > Review URL: https://chromiumcodereview.appspot.com/12335087 TBR=zork@chromium.org Review URL: https://codereview.chromium.org/12611018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187274 0039d316-1c4b-4281-b951-d872f2087c98
* Implement the Stream registry in contentzork@chromium.org2013-03-111-0/+113
This is the first part of the content side of the Streams api. See: https://bugs.webkit.org/show_bug.cgi?id=110194 https://dvcs.w3.org/hg/streams-api/raw-file/tip/Overview.htm BUG=171585 Review URL: https://chromiumcodereview.appspot.com/12335087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187230 0039d316-1c4b-4281-b951-d872f2087c98