summaryrefslogtreecommitdiffstats
path: root/net/http/http_cache_transaction.cc
Commit message (Collapse)AuthorAgeFilesLines
* Http cache: If we issue a byte range request for x bytesrvargas@google.com2010-01-211-2/+6
| | | | | | | | | | | | | | and the server replies that it is giving us x bytes but we receive less than that, forward the failure to the caller instead of asking for another range. BUG=31000 TEST=unittests Review URL: http://codereview.chromium.org/545101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36771 0039d316-1c4b-4281-b951-d872f2087c98
* Http Cache: Use asynchronous Open/Create/Doom entry calls.rvargas@google.com2010-01-141-41/+55
| | | | | | | | | | | | | | | | More changes to the state machine: now we really issue asynchronous calls when getting new cache entries. We have to add a new serialization mechanism to the http cache in order to handle races among multiple requests creating and opening the same entry. BUG=26729 TEST=unittests Review URL: http://codereview.chromium.org/523019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36211 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Add a histogram to see how headers relatedrvargas@google.com2010-01-121-0/+44
| | | | | | | | | | | | to automatic resuming of requests are distributed. BUG=none TEST=none Review URL: http://codereview.chromium.org/543021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36029 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Avoid resuming (and keeping) truncated entriesrvargas@google.com2010-01-081-2/+10
| | | | | | | | | | | | | | | | | | if the server doesn't provide a strong validator. We require: - A strong etag or a strong last modified date. - The total Content length. - Lack of an explicit rejection of ranges (Accept-ranges: none) This aligns better with the conditions used by Firefox. BUG=30220, b/2329250 TEST=unittests Review URL: http://codereview.chromium.org/517043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35761 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Use asynchronous IO to read an write thervargas@google.com2009-12-211-33/+51
| | | | | | | | | | | | response headers from the disk cache. BUG=26729 TEST=current unit tests. Review URL: http://codereview.chromium.org/506081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35094 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Add a test to make sure that the cachervargas@google.com2009-12-181-1/+1
| | | | | | | | | | | | | | | | works as expected with synchronous responses. As an added bonus, now changing the default test mode of kRangeGET_TransactionOK doesn't end up with some tests hanging, so it is easy to manually verify that all tests work as expected. BUG=26729 TEST=unittests Review URL: http://codereview.chromium.org/501099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34914 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Add a few more states to the transaction SM.rvargas@google.com2009-12-171-138/+240
| | | | | | | | | | | | Now we have states for writing and reading the cached headers. BUG=26726, 18055 TEST=covered by current unit tests Review URL: http://codereview.chromium.org/500009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34845 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Don't use multiple validation headers whenrvargas@google.com2009-12-051-1/+3
| | | | | | | | | | | | | dealing with byte range requests. Some servers are not happy with that. BUG=25859 TEST=none Review URL: http://codereview.chromium.org/460098 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33919 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Second pass to move the HttpCache::Transactionrvargas@google.com2009-12-051-98/+195
| | | | | | | | | | | to a state machine. BUG=26729 TEST=current unit tests. Review URL: http://codereview.chromium.org/464028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33904 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: First pass to move the HttpCache::Transaction to a sate machine.rvargas@google.com2009-12-041-119/+173
| | | | | | | | | | | | This CL only implements the states that are related to current asynchronous operations. BUG=26729 TEST=current unit tests. Review URL: http://codereview.chromium.org/410005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33760 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Don't access entry_ if an error switchesrvargas@google.com2009-12-021-1/+2
| | | | | | | | | | | | the transaction to mode NONE and deletes the entry_. BUG=28994 TEST=unittests Review URL: http://codereview.chromium.org/449069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33580 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Add code to restart a network request when thervargas@google.com2009-12-011-23/+49
| | | | | | | | | | | | server doesn't revalidate a partially stored entry, in other words, after we issued a conditional byte range request. BUG=27276, 28850 TEST=unittests Review URL: http://codereview.chromium.org/452017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33412 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 33133 - Http cache: Add code to restart a network request when thervargas@google.com2009-11-301-42/+23
| | | | | | | | | | | | | | | server doesn't revalidate a partially stored entry, in other words, after we issued a conditional byte range request. BUG=27276, 28850 TEST=unittests Review URL: http://codereview.chromium.org/434052 TBR=rvargas@google.com Review URL: http://codereview.chromium.org/452003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33253 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 33251 - Http cache: Delete the response headers when the network ↵rvargas@google.com2009-11-301-2/+0
| | | | | | | | | | | | | | | | | | | transaction is recreated, and make sure that truncated_ is also creared. This is a tentative fix for some crashes from the reliability bot. BUG=28850 TEST=none TBR=eroman Review URL: http://codereview.chromium.org/444020 TBR=rvargas@google.com Review URL: http://codereview.chromium.org/452002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33252 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Delete the response headers when the network transactionrvargas@google.com2009-11-291-0/+2
| | | | | | | | | | | | | | is re-created, and make sure that truncated_ is also creared. This is a tentative fix for some crashes from the reliability bot. BUG=28850 TEST=none TBR=eroman Review URL: http://codereview.chromium.org/444020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33251 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Add code to restart a network request when thervargas@google.com2009-11-251-23/+42
| | | | | | | | | | | | server doesn't revalidate a partially stored entry, in other words, after we issued a conditional byte range request. BUG=27276 TEST=unittests Review URL: http://codereview.chromium.org/434052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33133 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Make sure that when we cancel a request forrvargas@google.com2009-11-201-1/+1
| | | | | | | | | | | | | a truncated entry, we keep the truncation flag. BUG=27276 TEST=unittests Review URL: http://codereview.chromium.org/422002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32707 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Add the logic to cancel entry_ready_callback_.rvargas@google.com2009-11-191-0/+8
| | | | | | | | | BUG=28204 TEST=unittests Review URL: http://codereview.chromium.org/403027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32523 0039d316-1c4b-4281-b951-d872f2087c98
* Http Cache: Split HttpCache::Transaction to its own setrvargas@google.com2009-11-111-0/+1371
of files. No real code change... I'm just moving code around. BUG=26729 TEST=none Review URL: http://codereview.chromium.org/387017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31693 0039d316-1c4b-4281-b951-d872f2087c98