commit | 7fd7423cdee0dba84faf480d10dd66dcb57110d9 | [log] [tgz] |
---|---|---|
author | art-snake <[email protected]> | Wed Oct 26 18:25:39 2016 |
committer | Commit bot <[email protected]> | Wed Oct 26 18:29:07 2016 |
tree | 49780ce942d9831e0c60ba2fa74995660103c46c | |
parent | 46a480d09ec3eaa4d5634bc9076b981e867b4ab8 [diff] |
Improve linearized pdf load/show time. Reduce Pdf Plugin's count of reconnects. Add tests for PDFPlugin DocumentLoader. DocumentLoader was splitted into separate components, and missing tests was added for them. The main ideas in this CL are: 1) Do not reset browser initiated connection at start (includes case when we can use range requests), if we request data near current downloading position. 2) Request as much data as we can on each request, and continue loading data using current range request. (like tape rewind) 3) Isolate RangeRequest logic into DocumentLoader. Method OnPendingRequestComplete is called, when we receive requested data (main connection, or Range connection). (like tape playing without rewing). 4) Fill this logic by tests. Example URL: http://www.major-landrover.ru/upload/attachments/f/9/f96aab07dab04ae89c8a509ec1ef2b31.pdf Comparison of changes: https://drive.google.com/file/d/0BzWfMBOuik2QNGg0SG93Y3lpUlE/view?usp=sharing Review-Url: https://codereview.chromium.org/2349753003 Cr-Commit-Position: refs/heads/master@{#427752}