summaryrefslogtreecommitdiffstats
path: root/content/browser/streams
Commit message (Collapse)AuthorAgeFilesLines
* [Net] Add a priority parameter to URLRequest's constructorakalin@chromium.org2013-10-311-2/+5
| | | | | | | | | | | | | | | | | | | This is so that it is clearer what the intended initial priority of a URLRequest is. It is also needed so that we can later enforce that if a URLRequest is set to ignore limits, it has MAXIMUM_PRIORITY; otherwise, we'd have to mandate that SetPriority() is called before set_load_flags(), which is fiddly. Also standardize on a single URLRequest constructor. BUG=166689 R=jam@chromium.org, jamesr@chromium.org, joth@chromium.org, mmenke@chromium.org, scottbyer@chromium.org, sky@chromium.org, tommi@chromium.org Review URL: https://codereview.chromium.org/51953002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232219 0039d316-1c4b-4281-b951-d872f2087c98
* Fix DCHECK caused by updating total_memory_usage_ for cloned streams.acolwell@chromium.org2013-09-211-3/+8
| | | | | | | | BUG=240603 Review URL: https://chromiumcodereview.appspot.com/23726048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224586 0039d316-1c4b-4281-b951-d872f2087c98
* Add an IPC to abort Stream construction.tyoshino@chromium.org2013-08-281-4/+4
| | | | | | | | | | | To be used by XHR to abort partially constructed Stream. https://codereview.chromium.org/18883002/ BUG=169957 Review URL: https://chromiumcodereview.appspot.com/23543002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220009 0039d316-1c4b-4281-b951-d872f2087c98
* Add ASSERT to unittest StreamURLRequestJob to avoid crash.tyoshino@chromium.org2013-08-271-0/+1
| | | | | | Review URL: https://chromiumcodereview.appspot.com/23159003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219759 0039d316-1c4b-4281-b951-d872f2087c98
* Make Stream return STREAM_ABORTED to tell the reader it's failed.tyoshino@chromium.org2013-08-234-10/+43
| | | | | | | | | | | | | | 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-225-5/+160
| | | | | | | | | | | | | | | | 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
* Test that Stream::ReadRawData doesn't return STREAM_EMPTY once Finalized.tyoshino@chromium.org2013-08-141-4/+47
| | | | | | | | | | | | | Check that once Stream::Finalize() is called and reader_ receives that, reader_.ReadRawData() never returns STREAM_EMPTY. Also removed unnecessary reader.Read() call. BUG=272640 Review URL: https://chromiumcodereview.appspot.com/23007003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217514 0039d316-1c4b-4281-b951-d872f2087c98
* StreamURLRequestJob::OnDataAvailable refactoringtyoshino@chromium.org2013-08-142-12/+34
| | | | | | | | | | | | - 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
* Remove unused variable declaration.etienneb@chromium.org2013-08-141-1/+0
| | | | | | | | | | | | This issue was found by a linter. R=zork@chromium.org BUG= Review URL: https://chromiumcodereview.appspot.com/23101002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217476 0039d316-1c4b-4281-b951-d872f2087c98
* Add Stream support to WebBlobRegistry and FileAPIMessageFilter.tyoshino@chromium.org2013-08-063-2/+11
| | | | | | | | | | | | | | | | 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-264-21/+18
| | | | | | | | | | | | | | | | | | | | 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
* Use a direct include of the message_loop header in content/, part 2.avi@chromium.org2013-07-182-2/+2
| | | | | | | | | | BUG=260807 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/19618002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212184 0039d316-1c4b-4281-b951-d872f2087c98
* content: Migrate from googleurl/ includes to url/ ones.tfarina@chromium.org2013-07-092-2/+2
| | | | | | | | | BUG=229660 TBR=darin@chromium.org Review URL: https://codereview.chromium.org/18868005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210626 0039d316-1c4b-4281-b951-d872f2087c98
* Call scoped_refptr<T>::get() rather than relying on implicit "operator T*"rsleevi@chromium.org2013-06-111-2/+1
| | | | | | | | | | | | | | | | | | | This upates calls to bound temporary objects to also use get(). While it has the same semantic equivalence to the existing code, this generally represents a dangerous pattern - indeed, part of the whole motivation for this change is to make this anti-pattern very visible to authors. This change simply updates all of the call sites, to allow the "operator T*" to be removed and preventing new instances. The existing instances will then be reviewed for "suspicious" changes and updated to use/pass scoped_refptr<T> rather than T*, as appropriate. BUG=110610 TBR=darin Review URL: https://codereview.chromium.org/15984016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205560 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of strings headers in content/browser/, part 2.avi@chromium.org2013-06-111-1/+1
| | | | | | | | | | BUG=247723 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16625010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205435 0039d316-1c4b-4281-b951-d872f2087c98
* Update includes of message_loop_proxy.brettw@chromium.org2013-06-102-2/+2
| | | | | | | | | | | 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
* Factor out HTTP status code and reason phrase in Blob and Stream ↵tyoshino@chromium.org2013-06-072-34/+11
| | | | | | | | | | | | | infrastructure into net/. TEST= out/Debug/content_unittests --gtest_filter='*Stream*' out/Debug/content_unittests --gtest_filter='*Blob*' out/Debug/net_unittests Review URL: https://chromiumcodereview.appspot.com/16120005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204797 0039d316-1c4b-4281-b951-d872f2087c98
* Update content/ to use scoped_refptr<T>::get() rather than implicit ↵rsleevi@chromium.org2013-06-026-15/+16
| | | | | | | | | | | | | "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
* Revert 198844 "Move sequenced_task_runner to base/task"dbeam@chromium.org2013-05-081-1/+1
| | | | | | | | | | | | | | | | | Reverting revisions that rely on r198820 so to unbreak the build. > Move sequenced_task_runner to base/task > > BUG= > R=akalin@chromium.org > > Review URL: https://codereview.chromium.org/14927008 TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/14985007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198848 0039d316-1c4b-4281-b951-d872f2087c98
* Move sequenced_task_runner to base/taskbrettw@chromium.org2013-05-081-1/+1
| | | | | | | | | BUG= R=akalin@chromium.org Review URL: https://codereview.chromium.org/14927008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198844 0039d316-1c4b-4281-b951-d872f2087c98
* content: Use base::MessageLoop.xhwang@chromium.org2013-05-043-9/+7
| | | | | | | | | BUG=236029 R=avi@chromium.org Review URL: https://chromiumcodereview.appspot.com/14335017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198316 0039d316-1c4b-4281-b951-d872f2087c98
* content: Remove use of ALLOW_THIS_IN_INITIALIZER_LIST.scherkus@chromium.org2013-04-302-2/+2
| | | | | | | | | | | 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
* Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>.erg@chromium.org2013-04-171-3/+3
| | | | | | | | | | | In r174057, ajwong@ added support for implicit testing to scoped_ptr<>. Removes these in content/. BUG=232084 Review URL: https://codereview.chromium.org/14081010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194608 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrite std::string("") to std::string(), Linux edition.dcheng@chromium.org2013-04-091-1/+1
| | | | | | | | | | | | | | | | | | | This patch was generated by running the empty_string clang tool across the Chromium Linux compilation database. Implicitly or explicitly constructing std::string() with a "" argument is inefficient as the caller needs to emit extra instructions to pass an argument, and the constructor needlessly copies a byte into internal storage. Rewriting these instances to simply call the default constructor appears to save ~14-18 kilobytes on an optimized release build. BUG=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=193020 Review URL: https://codereview.chromium.org/13145003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193040 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Rewrite std::string("") to std::string(), Linux edition."dcheng@chromium.org2013-04-091-1/+1
| | | | | | | | | | | | | | This reverts commit e59558b78e8c6a1b0bd916a724724b638c3c91b6. Revert "Fix build after r193020." This reverts commit 558a35897f6b3ffbcaefde927c1f150b815d140a. Revert "Really fix build after r193020." This reverts commit e3748a79b523a8d365d4a33ef986eebb4186fa78. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193030 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrite std::string("") to std::string(), Linux edition.dcheng@chromium.org2013-04-091-1/+1
| | | | | | | | | | | | | | | | | This patch was generated by running the empty_string clang tool across the Chromium Linux compilation database. Implicitly or explicitly constructing std::string() with a "" argument is inefficient as the caller needs to emit extra instructions to pass an argument, and the constructor needlessly copies a byte into internal storage. Rewriting these instances to simply call the default constructor appears to save ~14-18 kilobytes on an optimized release build. BUG=none Review URL: https://codereview.chromium.org/13145003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193020 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
* Move ByteStream to content/browserzork@chromium.org2013-03-211-1/+1
| | | | | | | | | BUG=180833 Review URL: https://chromiumcodereview.appspot.com/12440036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189665 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Stream URL request for async requestszork@chromium.org2013-03-212-8/+13
| | | | | | | | | 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 OWNERS file to content/browser/streamszork@chromium.org2013-03-201-0/+1
| | | | | | | | | BUG=NONE Review URL: https://chromiumcodereview.appspot.com/12854006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189328 0039d316-1c4b-4281-b951-d872f2087c98
* Add Resource Handler for creating Streams to forward to extensionszork@chromium.org2013-03-206-1/+122
| | | | | | | | | 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-145-2/+488
| | | | | | | | | 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-139-0/+688
| | | | | | | | | | | 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-119-659/+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-119-0/+659
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