| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
BUG=25859
TEST=unittests
Review URL: http://codereview.chromium.org/465087
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33999 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=24765
TEST=unit test, clear browsing data and the cache, media cache will
be cleared even if a media object was not loaded.
Since the disk cache backend in HttpCache is lazily initialized, clearing
the cache before it receives the first transaction would have no effect.
So initialize the disk cache explicitly when we clear the cache.
Review URL: http://codereview.chromium.org/378015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31361 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than drop all subsequent entries, we now preserve the final entry that was appended to the log.
This way, even if entries have been dropped, we can still infer what the total time was, and what the exit condition was.
Also makes LoadLog take the bound as a required parameter.
BUG=none
TEST=LoadLogUtilTest.DisplayOfTruncated
Review URL: http://codereview.chromium.org/363025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31274 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=26749
Review URL: http://codereview.chromium.org/368001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31165 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
of any operation that may block.
BUG=26730
TEST=none
Review URL: http://codereview.chromium.org/355028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31160 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
request headers for simple and externally conditionalized requests.
BUG=NONE
TEST=unittests
Review URL: http://codereview.chromium.org/361022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31108 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
end up skipping the cache.
BUG=26175
TEST=unittests
Review URL: http://codereview.chromium.org/348053
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30877 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
byte range requests.
BUG=25755
TEST=unittests
Review URL: http://codereview.chromium.org/339088
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30773 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the last pair of headers match the entry that we have
we allow the server response to update the entry.
BUG=23222
TEST=unittests
Review URL: http://codereview.chromium.org/345019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30748 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=25873
TEST=unittest
Review URL: http://codereview.chromium.org/330026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30165 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
when they belong to a doomed entry.
BUG=25588
TEST=unittests
Review URL: http://codereview.chromium.org/335015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30054 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=21383
TEST=unit tests
(original review for r25873: http://codereview.chromium.org/201065)
Review URL: http://codereview.chromium.org/313013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29792 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=b/2071330
TEST=unittests
Review URL: http://codereview.chromium.org/267101
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29035 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The sparse IO methods require exclusive use of the cache entry
and they complain when that requirement is violated. When the
user cancels a request and reissues another one to the same entry,
we may be waiting for the previous operation to finish when we
receive a new IO request, so we fail.
This CL add a way for the HTTP cache to cancel IO operations and
get a notification when the disk cache is able to operate on that
entry again.
BUG=23862
TEST=unittests
Review URL: http://codereview.chromium.org/256090
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28475 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
This change will doom the truncated entry and creates a new sparse entry.
TEST=unit tests
Review URL: http://codereview.chromium.org/251067
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27859 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
TEST=run chrome with --enable-byte-range-support --incognito and watch a video in http://tinyvid.tv/, seeking should be fine.
http_cache::PartialData used to read a length of zero when reading has reached
the end. The zero parameter will cause MemEntryImpl to complain about invalid
argument, so early return for the case that we know we have nothing to read.
Review URL: http://codereview.chromium.org/255034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27776 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
This got introduced with my changes to http_cache_unittest.cc.
TBR=wtc
Review URL: http://codereview.chromium.org/231011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27039 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
The goal is to end up with more meaningful errors if a page fails to load.
BUG=22623
Review URL: http://codereview.chromium.org/222009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27038 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
This appears to be responsible for a regression in downloading of files.
BUG=http://crbug.com/406
TBR=darin
Review URL: http://codereview.chromium.org/215035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26764 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=21383
TEST=covered by current unit tests.
Review URL: http://codereview.chromium.org/201065
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25873 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
cancel the request.
BUG=20930
TEST=unittests
Review URL: http://codereview.chromium.org/193043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25736 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
"open", "create", "waiting" and "read_info").
BUG=http://crbug.com/14478
TEST=HttpCache unittests.
Review URL: http://codereview.chromium.org/201035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25583 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TEST=net_unittests --gtest_filter=HttpCache.GET_Previous206_NotModified
Step to reproduce the failure:
1. Sparse cache has data for (0 - 9)
2. Make a non-range request for the resource
3. Server replies with 304 not modified
4. User would get 304 modified while 200 is expected
The cause is that PartialData::ResponseHeadersOK requires a full specified
range to accept the response when server replies with 304. This is not a
valid assumption as the response of 304 can be caused by the cache submitting
a range request for validation purpose.
Review URL: http://codereview.chromium.org/198018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25569 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
resource after the original request was interrupted.
BUG=8995
TEST=unittests
Review URL: http://codereview.chromium.org/197016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25551 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=http://crbug.com/20594
TEST=HttpCache.UpdatesRequestResponseTimeOn304
Review URL: http://codereview.chromium.org/199028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25541 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=http://crbug.com/20594
TEST=HttpCacheTest.UpdatesResponseTimeOn304
Review URL: http://codereview.chromium.org/197024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25484 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=20017
TEST=unittests
Review URL: http://codereview.chromium.org/177016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24759 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Requires --enable-byte-range-support
BUG=12258
TEST=covered by unit tests.
Review URL: http://codereview.chromium.org/173231
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24113 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/174260
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24026 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Requires --enable-byte-range-support
BUG=12258
TEST=covered by unit tests.
Review URL: http://codereview.chromium.org/173173
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24015 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
a range from the cache.
BUG=12258
TEST=unittests
Review URL: http://codereview.chromium.org/174039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23881 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Now we can serve byte range requests from cached 200s.
* When we receive 304 we make sure that we were expecting it.
* A range request that doesn't fit the currently stored entry
only deletes the entry if the server confirms that it has
changed.
* Make sure that LOAD_ONLY_FROM_CACHE causes cache misses for
byte range requests.
BUG=12258
TEST=unittests
Review URL: http://codereview.chromium.org/165479
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23601 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/164531
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23419 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
and proyxservice.This dependency comes from the parent URLRequest, and is used as a container for per-request profiling data.This change is strictly a no-op refactor -- the parameter is unused, and LoadLog does nothing.BUG=http://crbug.com/14478TEST=none -- just needs to compile and pass existing tests.DESIGN=<http://docs.google.com/Doc?id=dfhcnb2v_21gbtrcpr3&hl=en>
Review URL: http://codereview.chromium.org/126303
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23127 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Now we handle regular requests (not byte range requests) that
end up reading a cached entry that stores byte ranges. In this
case we create a control object (partial_), but it's byte_range_
member is always invalid because the user is not requesting
a range.
* Given that we may find stored 206s that are not keeping sparse
data, we detect that case and handle it.
* Now we may end up reading 206 from disk (and the net) and having
to change the returned status to be 200 (for regular requests).
* We avoid performing re-validations for each piece of stored data.
Instead, we consider the whole entry to be revalidated once, and
read from the cache without asking the server (as far as we can).
* When processing the received headers we now consider receiving
200 and 416 (instead of 206/304) and we handle inconsistencies
in the range returned by the server (from what we expect). We
also handle receiving 206 when we don't expect it.
BUG=12258
TEST=unittests
Review URL: http://codereview.chromium.org/164304
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23123 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
entry to delete.
The disk cache may fail to provide the key for a given entry
(if there is a disk error, for instance), so we fall back
to enumerate the active entries to delete this one.
BUG=9952
TEST=unittest
Review URL: http://codereview.chromium.org/165089
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22701 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are requests where conditionalization is specified through |extra_headers| rather than through a load flag (LOAD_VALIDATE_CACHE).
The previous behavior was that such requests would disable caching. So any more up-to-date response discovered by an "if-modifed-since" request was never written back to the cache.
BUG=http://crbug.com/16199
TEST=HttpCache unit tes
Overview for how these requests are dealt with:
(1)
When starting the request, check for an "if-modified-since" or "if-none-match" request header.
If one is found:
* let it be called |external_validation_header|
* continue to (2).
(2)
Parse |external_validation_header| to obtain either an |etag| or a |last_modified_date|.
(3)
Read the HTTP cache entry for URL. Call the result |entry|.
(4)
Now that we have read the cache entry, check if |external_validation_header| defines a validation request for |entry|.
We cannot assume that |external_validation_header| makes sense in the context of |entry|, since the headers are free-form text originating from WebCore, and could be unrelated to the cache entry.
If any of the following are true, then |external_validation_header| does NOT define a validation request for |entry|:
* |entry| is undefined (was not found in step (3)).
* |entry| has no "etag" or "last-modified" headers.
* |entry| has a "last-modified" header, but it is not equal to |external_validation_header|'s |last_modified_date|.
* |entry| has an "etag" header, but it does not match |external_validation_header|'s |etag|.
Let |is_validation_request| be the result of this test.
If |is_validation_request|, then we can safely use the response from the subsequent network response to update |entry|.
If |!is_validation_request|, then we disable caching before proceeding on to the network request.
NOTE: we turned off writing back to cache in this case, since a 304 response received from the server doesn't tell us anything about our cache entry. And moreover trying to handle a non-304 response would be awkward to deal with since the transaction would have to enter a "maybe will write to cache" state.
(5)
Start the network transaction.
(6)
On completion of the network transaction:
if we are doing an internal OR an external validation request:
if |http_code == 304|
update |entry|'s response headers with the new response headers.
if it was externally conditionalized:
return the received response (304) to the user
else if it was internally conditionalized:
return the cached response (200) to the user
Review URL: http://codereview.chromium.org/159463
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22328 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=http://crbug.com/17493
TEST=HttpCache.UrlContainingHash
Review URL: http://codereview.chromium.org/155972
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21408 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
requests (if-modified-since).
This test does not pass, and is currently disabled -- it will be enabled once 16199 is fixed.
BUG=http://crbug.com/16199
Review URL: http://codereview.chromium.org/159220
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21359 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is possible for a crazy server to return 206 even
though we are not making a range request. In that
case, we should not allow the stored response to go
through the logic for range support (which right now
is disabled). We've always stored those 206s though.
BUG=15617
TEST=unittest
Review URL: http://codereview.chromium.org/150090
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19621 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=12258
TEST=unittest
Review URL: http://codereview.chromium.org/147042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19142 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=12258
TEST=unittests
Review URL: http://codereview.chromium.org/140015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18961 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the first pass to implement support for range
requests and the asociated sparse cache entry.
It is disabled by default, and requires ENABLE_RANGE_SUPPORT
to be defined in order to activate the code: all the code
is compiled in, but Start() bypasses the cache for range
requests, and OnNetworkInfoAvailable ignores 206.
Big parts are still not implemented. Most notably we are
not modifying the response headers that we send to the
user, so the content-range and content-length info
are not correct.
BUG=12258
TEST=Unit tests.
Review URL: http://codereview.chromium.org/118345
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18289 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The first exposes a method to close all idle sockets. This allows
me to create benchmark tests in the app which can close
connections before starting the test for better simulations.
The second change is to expose cache modes for cache
disabled and cache bypassed. DISABLE sets the LOAD_DISABLE_CACHE
on every request; BYPASS sets the LOAD_BYPASS_CACHE on
every request.
TEST=http_cache_unittest.cc
BUG=6754
Review URL: http://codereview.chromium.org/119189
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17720 0039d316-1c4b-4281-b951-d872f2087c98
|