summaryrefslogtreecommitdiffstats
path: root/net/http/http_cache_transaction.cc
Commit message (Collapse)AuthorAgeFilesLines
* Generalize the net module's LoadLog facility from a passive container, to an ↵eroman@chromium.org2010-03-161-18/+18
| | | | | | | | | | | | | | | | event stream (NetLog). This makes it possible to associate a single NetLog with a URLRequestContext, and then attach observers to that log to watch the stream of events. This changelist attempts to do the most direct translation, so there will be subsequent iterations to clean up. The user-visible behavior should remain unchanged. BUG=37421 Review URL: http://codereview.chromium.org/848006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41689 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Reorder the files after the previous mess-up.rvargas@google.com2010-03-081-564/+568
| | | | | | | | | | | | No real code change. BUG=none TEST=none Review URL: http://codereview.chromium.org/669142 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40967 0039d316-1c4b-4281-b951-d872f2087c98
* Remove debug info used to diagnose bug 31723.rvargas@google.com2010-03-031-12/+0
| | | | | | | | | BUG=31723 TEST=none Review URL: http://codereview.chromium.org/660431 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40570 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Expose storing metadata on a given entry.rvargas@google.com2010-03-021-7/+58
| | | | | | | | | | BUG=32406 TEST=unittests Review URL: http://codereview.chromium.org/660041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40400 0039d316-1c4b-4281-b951-d872f2087c98
* Add APIs to expose http cache's metadata and thervargas@google.com2010-02-231-0/+13
| | | | | | | | | | | the ability to stop caching a given request. BUG=32406, 22900 TEST=none Review URL: http://codereview.chromium.org/600167 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39751 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Remove the explicit transaction callback and let thervargas@google.com2010-02-111-4/+4
| | | | | | | | | | | cache grab it when needed. BUG=26729 TEST=none. Review URL: http://codereview.chromium.org/594041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38848 0039d316-1c4b-4281-b951-d872f2087c98
* Http Cache: Eliminate EntryAvailable() and make the cache uservargas@google.com2010-02-111-16/+19
| | | | | | | | | | | | | callbacks to notify the transaction about the completion of AddTransactionToEntry. BUG=26729 TEST=current tests. Review URL: http://codereview.chromium.org/593058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38808 0039d316-1c4b-4281-b951-d872f2087c98
* Http Cache: Add a load log to the DoomEntry operation.rvargas@google.com2010-02-111-1/+2
| | | | | | | | | | BUG=26729 TEST=unittest Review URL: http://codereview.chromium.org/603011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38713 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Make sure that we don't send notificationsrvargas@google.com2010-02-101-1/+6
| | | | | | | | | | | from the cache transaction destructor. BUG=31723 TEST=unittests Review URL: http://codereview.chromium.org/594018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38554 0039d316-1c4b-4281-b951-d872f2087c98
* Add debug info to track a crash when sleeping.rvargas@google.com2010-02-041-0/+11
| | | | | | | | | BUG=31723 TEST=none Review URL: http://codereview.chromium.org/560039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38070 0039d316-1c4b-4281-b951-d872f2087c98
* 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