summaryrefslogtreecommitdiffstats
path: root/content/browser/streams
Commit message (Collapse)AuthorAgeFilesLines
* Standardize usage of virtual/override/final in content/browser/dcheng2014-10-214-25/+18
| | | | | | | | | | | | This patch was automatically generated by applying clang fixit hints generated by the plugin to the source tree. BUG=417463 TBR=sky@chromium.org Review URL: https://codereview.chromium.org/667943003 Cr-Commit-Position: refs/heads/master@{#300469}
* Split up streams logic to prepare for PlzNavigate RDH changes.davidben2014-10-154-53/+6
| | | | | | | | | | | | | | | | | 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}
* Replace FINAL and OVERRIDE with their C++11 counterparts in contentmohan.reddy2014-10-094-18/+18
| | | | | | | | | | | This step is a giant search and replace for OVERRIDE and FINAL to replace them with their lowercase versions. BUG=417463 Review URL: https://codereview.chromium.org/637183002 Cr-Commit-Position: refs/heads/master@{#298804}
* Fix crash caused by NULL response_headers passed to StreamHandleImplraymes2014-09-231-5/+9
| | | | | | | | | This fixes a bug introduced in https://codereview.chromium.org/588643002 which caused a crash if NULL response_headers were passed to StreamhandleImpl. Review URL: https://codereview.chromium.org/587173002 Cr-Commit-Position: refs/heads/master@{#296104}
* Make a copy of HttpResponseHeaders in StreamHandleImpl.davidben2014-09-191-1/+4
| | | | | | | | | | | | | BufferedResourceHandler passes the response to both the old and the new handler, so there is a race where the streams logic could access headers on the UI thread while the old handler (AsyncResourceHandler) is busy modifying them (via ChromeResourceDispatcherHostDelegate). BUG=none Review URL: https://codereview.chromium.org/588643002 Cr-Commit-Position: refs/heads/master@{#295753}
* Implement chrome.streamsPrivate.abort() extensions functionraymes@google.com2014-05-282-2/+20
| | | | | | | | | | | This implements an extensions API to abort a stream that has been started. Aborting the stream will cause the original URL request to be cancelled, which may be desired if the client of the API wants to cancel the request before it is completely downloaded. BUG=348464,303491 R=jam@chromium.org, kalman@chromium.org, mpearson@chromium.org, zork@chromium.org Review URL: https://codereview.chromium.org/281513003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273087 0039d316-1c4b-4281-b951-d872f2087c98
* Change the streamsPrivate extensions API to return HTTP response headers in ↵raymes@chromium.org2014-03-264-12/+18
| | | | | | | | | | | | | | 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
* Allow the content browser client to specify a special cookie store to betburkard@chromium.org2014-03-121-2/+2
| | | | | | | | | | | | | | | used for a given render process id. This special cookie store will then be used for renderer messages pertaining to cookies, url fetches in net, and websockets. If the special cookie store is NULL, a default cookie store will be used. Re-submit of https://codereview.chromium.org/188693003 See https://codereview.chromium.org/188693003 for reviewers/lgtm's. Review URL: https://codereview.chromium.org/197043005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256657 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 256579 "Allow the content browser client to specify a spe..."peter@chromium.org2014-03-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | This broke the Android builders. The try-bots on the CL did point out the compile errors, but it was committed manually anyway. Logs: http://build.chromium.org/p/chromium.linux/builders/Android%20Clang%20Builder%20%28dbg%29/builds/30977/steps/compile/logs/stdio > Allow the content browser client to specify a special cookie store to be > used for a given render process id. This special cookie store will then > be used for renderer messages pertaining to cookies, url fetches in net, > and websockets. If the special cookie store is NULL, a default cookie store > will be used. > > R=erikwright@chromium.org, jam@chromium.org, lambroslambrou@chromium.org, mmenke@chromium.org, tyoshino@chromium.org > > Review URL: https://codereview.chromium.org/188693003 TBR=tburkard@chromium.org Review URL: https://codereview.chromium.org/197463003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256583 0039d316-1c4b-4281-b951-d872f2087c98
* Allow the content browser client to specify a special cookie store to betburkard@chromium.org2014-03-121-2/+2
| | | | | | | | | | | | | used for a given render process id. This special cookie store will then be used for renderer messages pertaining to cookies, url fetches in net, and websockets. If the special cookie store is NULL, a default cookie store will be used. R=erikwright@chromium.org, jam@chromium.org, lambroslambrou@chromium.org, mmenke@chromium.org, tyoshino@chromium.org Review URL: https://codereview.chromium.org/188693003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256579 0039d316-1c4b-4281-b951-d872f2087c98
* Pass http response headers to the streamsPrivate API callbackraymes@chromium.org2014-03-074-6/+19
| | | | | | | | | | | | 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
* plain/text is not a real MIME type.davidben@chromium.org2014-02-271-1/+1
| | | | | | | | | | Fix references to it to be 'text/plain'. Also one instance of 'plain/html'. BUG=none Review URL: https://codereview.chromium.org/178153002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253646 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove unneeded browser_thread.h includes in content/.thestig@chromium.org2014-02-154-3/+8
| | | | | | | | Fix lint errors too. Review URL: https://codereview.chromium.org/166243002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251505 0039d316-1c4b-4281-b951-d872f2087c98
* Removes MessageLoop::TYPE_XXX where possiblesky@chromium.org2014-01-151-2/+2
| | | | | | | | | | | | This is part of attempting to get rid of MessageLoop::Type enum. BUG=none TEST=none R=darin@chromium.org Review URL: https://codereview.chromium.org/136683004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244996 0039d316-1c4b-4281-b951-d872f2087c98
* Net: Standardize HttpByteRange printingtommycli@chromium.org2013-11-261-2/+5
| | | | | | | | | BUG=318450 TBR=benm@chromium.org,sky@chromium.org Review URL: https://codereview.chromium.org/78343004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237400 0039d316-1c4b-4281-b951-d872f2087c98
* [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