diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-02 18:17:18 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-02 18:17:18 +0000 |
commit | ffd77f7a08e63b7bc531f6c463c39a794a21b6d1 (patch) | |
tree | 02efef3f71d5cca8cd0837dab1738585b2ed128c /net | |
parent | a23f3031457f6518580a976204c099bb43069dd2 (diff) | |
download | chromium_src-ffd77f7a08e63b7bc531f6c463c39a794a21b6d1.zip chromium_src-ffd77f7a08e63b7bc531f6c463c39a794a21b6d1.tar.gz chromium_src-ffd77f7a08e63b7bc531f6c463c39a794a21b6d1.tar.bz2 |
If a disk cache entry is stored as an external file, and it is reused (open/truncate/write/close), the current cache size should be modified accordingly. I'm also bumping up the version number for the cache files, to force re-creation with this revision.
BUG=1305909
TEST=Unit test.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
128 files changed, 43 insertions, 2 deletions
diff --git a/net/data/cache_tests/bad_entry/data_0 b/net/data/cache_tests/bad_entry/data_0 Binary files differindex 3e21df8..a746b99 100644 --- a/net/data/cache_tests/bad_entry/data_0 +++ b/net/data/cache_tests/bad_entry/data_0 diff --git a/net/data/cache_tests/bad_entry/data_1 b/net/data/cache_tests/bad_entry/data_1 Binary files differindex 79c87af..951df12 100644 --- a/net/data/cache_tests/bad_entry/data_1 +++ b/net/data/cache_tests/bad_entry/data_1 diff --git a/net/data/cache_tests/bad_entry/data_2 b/net/data/cache_tests/bad_entry/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/bad_entry/data_2 +++ b/net/data/cache_tests/bad_entry/data_2 diff --git a/net/data/cache_tests/bad_entry/data_3 b/net/data/cache_tests/bad_entry/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/bad_entry/data_3 +++ b/net/data/cache_tests/bad_entry/data_3 diff --git a/net/data/cache_tests/bad_entry/index b/net/data/cache_tests/bad_entry/index Binary files differindex ad42f278..c10a3d3 100644 --- a/net/data/cache_tests/bad_entry/index +++ b/net/data/cache_tests/bad_entry/index diff --git a/net/data/cache_tests/bad_rankings/data_0 b/net/data/cache_tests/bad_rankings/data_0 Binary files differindex e7bf298..e0a8032 100644 --- a/net/data/cache_tests/bad_rankings/data_0 +++ b/net/data/cache_tests/bad_rankings/data_0 diff --git a/net/data/cache_tests/bad_rankings/data_1 b/net/data/cache_tests/bad_rankings/data_1 Binary files differindex 1e000f9..ae9d564 100644 --- a/net/data/cache_tests/bad_rankings/data_1 +++ b/net/data/cache_tests/bad_rankings/data_1 diff --git a/net/data/cache_tests/bad_rankings/data_2 b/net/data/cache_tests/bad_rankings/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/bad_rankings/data_2 +++ b/net/data/cache_tests/bad_rankings/data_2 diff --git a/net/data/cache_tests/bad_rankings/data_3 b/net/data/cache_tests/bad_rankings/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/bad_rankings/data_3 +++ b/net/data/cache_tests/bad_rankings/data_3 diff --git a/net/data/cache_tests/bad_rankings/index b/net/data/cache_tests/bad_rankings/index Binary files differindex ad42f278..c10a3d3 100644 --- a/net/data/cache_tests/bad_rankings/index +++ b/net/data/cache_tests/bad_rankings/index diff --git a/net/data/cache_tests/insert_empty1/data_0 b/net/data/cache_tests/insert_empty1/data_0 Binary files differindex 3b52b37..cbb785e 100644 --- a/net/data/cache_tests/insert_empty1/data_0 +++ b/net/data/cache_tests/insert_empty1/data_0 diff --git a/net/data/cache_tests/insert_empty1/data_1 b/net/data/cache_tests/insert_empty1/data_1 Binary files differindex c66ca74..72b82f2 100644 --- a/net/data/cache_tests/insert_empty1/data_1 +++ b/net/data/cache_tests/insert_empty1/data_1 diff --git a/net/data/cache_tests/insert_empty1/data_2 b/net/data/cache_tests/insert_empty1/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/insert_empty1/data_2 +++ b/net/data/cache_tests/insert_empty1/data_2 diff --git a/net/data/cache_tests/insert_empty1/data_3 b/net/data/cache_tests/insert_empty1/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/insert_empty1/data_3 +++ b/net/data/cache_tests/insert_empty1/data_3 diff --git a/net/data/cache_tests/insert_empty1/index b/net/data/cache_tests/insert_empty1/index Binary files differindex 7401238..a26139a 100644 --- a/net/data/cache_tests/insert_empty1/index +++ b/net/data/cache_tests/insert_empty1/index diff --git a/net/data/cache_tests/insert_empty2/data_0 b/net/data/cache_tests/insert_empty2/data_0 Binary files differindex 78e67d6..20f5c30 100644 --- a/net/data/cache_tests/insert_empty2/data_0 +++ b/net/data/cache_tests/insert_empty2/data_0 diff --git a/net/data/cache_tests/insert_empty2/data_1 b/net/data/cache_tests/insert_empty2/data_1 Binary files differindex c66ca74..72b82f2 100644 --- a/net/data/cache_tests/insert_empty2/data_1 +++ b/net/data/cache_tests/insert_empty2/data_1 diff --git a/net/data/cache_tests/insert_empty2/data_2 b/net/data/cache_tests/insert_empty2/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/insert_empty2/data_2 +++ b/net/data/cache_tests/insert_empty2/data_2 diff --git a/net/data/cache_tests/insert_empty2/data_3 b/net/data/cache_tests/insert_empty2/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/insert_empty2/data_3 +++ b/net/data/cache_tests/insert_empty2/data_3 diff --git a/net/data/cache_tests/insert_empty2/index b/net/data/cache_tests/insert_empty2/index Binary files differindex 7401238..a26139a 100644 --- a/net/data/cache_tests/insert_empty2/index +++ b/net/data/cache_tests/insert_empty2/index diff --git a/net/data/cache_tests/insert_empty3/data_0 b/net/data/cache_tests/insert_empty3/data_0 Binary files differindex fa32996..187d64f 100644 --- a/net/data/cache_tests/insert_empty3/data_0 +++ b/net/data/cache_tests/insert_empty3/data_0 diff --git a/net/data/cache_tests/insert_empty3/data_1 b/net/data/cache_tests/insert_empty3/data_1 Binary files differindex c66ca74..72b82f2 100644 --- a/net/data/cache_tests/insert_empty3/data_1 +++ b/net/data/cache_tests/insert_empty3/data_1 diff --git a/net/data/cache_tests/insert_empty3/data_2 b/net/data/cache_tests/insert_empty3/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/insert_empty3/data_2 +++ b/net/data/cache_tests/insert_empty3/data_2 diff --git a/net/data/cache_tests/insert_empty3/data_3 b/net/data/cache_tests/insert_empty3/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/insert_empty3/data_3 +++ b/net/data/cache_tests/insert_empty3/data_3 diff --git a/net/data/cache_tests/insert_empty3/index b/net/data/cache_tests/insert_empty3/index Binary files differindex 7401238..a26139a 100644 --- a/net/data/cache_tests/insert_empty3/index +++ b/net/data/cache_tests/insert_empty3/index diff --git a/net/data/cache_tests/insert_load1/data_0 b/net/data/cache_tests/insert_load1/data_0 Binary files differindex 4a53982..9ded89b 100644 --- a/net/data/cache_tests/insert_load1/data_0 +++ b/net/data/cache_tests/insert_load1/data_0 diff --git a/net/data/cache_tests/insert_load1/data_1 b/net/data/cache_tests/insert_load1/data_1 Binary files differindex 3689e0d..12d8b90 100644 --- a/net/data/cache_tests/insert_load1/data_1 +++ b/net/data/cache_tests/insert_load1/data_1 diff --git a/net/data/cache_tests/insert_load1/data_2 b/net/data/cache_tests/insert_load1/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/insert_load1/data_2 +++ b/net/data/cache_tests/insert_load1/data_2 diff --git a/net/data/cache_tests/insert_load1/data_3 b/net/data/cache_tests/insert_load1/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/insert_load1/data_3 +++ b/net/data/cache_tests/insert_load1/data_3 diff --git a/net/data/cache_tests/insert_load1/index b/net/data/cache_tests/insert_load1/index Binary files differindex 4c0f2a0..5d2384f 100644 --- a/net/data/cache_tests/insert_load1/index +++ b/net/data/cache_tests/insert_load1/index diff --git a/net/data/cache_tests/insert_load2/data_0 b/net/data/cache_tests/insert_load2/data_0 Binary files differindex 26bcef6..3b3c57a 100644 --- a/net/data/cache_tests/insert_load2/data_0 +++ b/net/data/cache_tests/insert_load2/data_0 diff --git a/net/data/cache_tests/insert_load2/data_1 b/net/data/cache_tests/insert_load2/data_1 Binary files differindex b13d284..16a8d5e 100644 --- a/net/data/cache_tests/insert_load2/data_1 +++ b/net/data/cache_tests/insert_load2/data_1 diff --git a/net/data/cache_tests/insert_load2/data_2 b/net/data/cache_tests/insert_load2/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/insert_load2/data_2 +++ b/net/data/cache_tests/insert_load2/data_2 diff --git a/net/data/cache_tests/insert_load2/data_3 b/net/data/cache_tests/insert_load2/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/insert_load2/data_3 +++ b/net/data/cache_tests/insert_load2/data_3 diff --git a/net/data/cache_tests/insert_load2/index b/net/data/cache_tests/insert_load2/index Binary files differindex c86fc19..203405a 100644 --- a/net/data/cache_tests/insert_load2/index +++ b/net/data/cache_tests/insert_load2/index diff --git a/net/data/cache_tests/insert_one1/data_0 b/net/data/cache_tests/insert_one1/data_0 Binary files differindex b11dc24..a5476b3 100644 --- a/net/data/cache_tests/insert_one1/data_0 +++ b/net/data/cache_tests/insert_one1/data_0 diff --git a/net/data/cache_tests/insert_one1/data_1 b/net/data/cache_tests/insert_one1/data_1 Binary files differindex 370dabb..b59d85b 100644 --- a/net/data/cache_tests/insert_one1/data_1 +++ b/net/data/cache_tests/insert_one1/data_1 diff --git a/net/data/cache_tests/insert_one1/data_2 b/net/data/cache_tests/insert_one1/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/insert_one1/data_2 +++ b/net/data/cache_tests/insert_one1/data_2 diff --git a/net/data/cache_tests/insert_one1/data_3 b/net/data/cache_tests/insert_one1/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/insert_one1/data_3 +++ b/net/data/cache_tests/insert_one1/data_3 diff --git a/net/data/cache_tests/insert_one1/index b/net/data/cache_tests/insert_one1/index Binary files differindex 3e4e7e3..8fc68b9 100644 --- a/net/data/cache_tests/insert_one1/index +++ b/net/data/cache_tests/insert_one1/index diff --git a/net/data/cache_tests/insert_one2/data_0 b/net/data/cache_tests/insert_one2/data_0 Binary files differindex 36e58cb..c19f8f9 100644 --- a/net/data/cache_tests/insert_one2/data_0 +++ b/net/data/cache_tests/insert_one2/data_0 diff --git a/net/data/cache_tests/insert_one2/data_1 b/net/data/cache_tests/insert_one2/data_1 Binary files differindex 370dabb..b59d85b 100644 --- a/net/data/cache_tests/insert_one2/data_1 +++ b/net/data/cache_tests/insert_one2/data_1 diff --git a/net/data/cache_tests/insert_one2/data_2 b/net/data/cache_tests/insert_one2/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/insert_one2/data_2 +++ b/net/data/cache_tests/insert_one2/data_2 diff --git a/net/data/cache_tests/insert_one2/data_3 b/net/data/cache_tests/insert_one2/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/insert_one2/data_3 +++ b/net/data/cache_tests/insert_one2/data_3 diff --git a/net/data/cache_tests/insert_one2/index b/net/data/cache_tests/insert_one2/index Binary files differindex 3e4e7e3..8fc68b9 100644 --- a/net/data/cache_tests/insert_one2/index +++ b/net/data/cache_tests/insert_one2/index diff --git a/net/data/cache_tests/insert_one3/data_0 b/net/data/cache_tests/insert_one3/data_0 Binary files differindex fd23de4..c52ee67 100644 --- a/net/data/cache_tests/insert_one3/data_0 +++ b/net/data/cache_tests/insert_one3/data_0 diff --git a/net/data/cache_tests/insert_one3/data_1 b/net/data/cache_tests/insert_one3/data_1 Binary files differindex 370dabb..b59d85b 100644 --- a/net/data/cache_tests/insert_one3/data_1 +++ b/net/data/cache_tests/insert_one3/data_1 diff --git a/net/data/cache_tests/insert_one3/data_2 b/net/data/cache_tests/insert_one3/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/insert_one3/data_2 +++ b/net/data/cache_tests/insert_one3/data_2 diff --git a/net/data/cache_tests/insert_one3/data_3 b/net/data/cache_tests/insert_one3/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/insert_one3/data_3 +++ b/net/data/cache_tests/insert_one3/data_3 diff --git a/net/data/cache_tests/insert_one3/index b/net/data/cache_tests/insert_one3/index Binary files differindex 3e4e7e3..8fc68b9 100644 --- a/net/data/cache_tests/insert_one3/index +++ b/net/data/cache_tests/insert_one3/index diff --git a/net/data/cache_tests/list_loop/data_0 b/net/data/cache_tests/list_loop/data_0 Binary files differindex 7c3eb02..308e8f2 100644 --- a/net/data/cache_tests/list_loop/data_0 +++ b/net/data/cache_tests/list_loop/data_0 diff --git a/net/data/cache_tests/list_loop/data_1 b/net/data/cache_tests/list_loop/data_1 Binary files differindex f3e6a70..7fc6323 100644 --- a/net/data/cache_tests/list_loop/data_1 +++ b/net/data/cache_tests/list_loop/data_1 diff --git a/net/data/cache_tests/list_loop/data_2 b/net/data/cache_tests/list_loop/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/list_loop/data_2 +++ b/net/data/cache_tests/list_loop/data_2 diff --git a/net/data/cache_tests/list_loop/data_3 b/net/data/cache_tests/list_loop/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/list_loop/data_3 +++ b/net/data/cache_tests/list_loop/data_3 diff --git a/net/data/cache_tests/list_loop/index b/net/data/cache_tests/list_loop/index Binary files differindex c159dab..1415154 100644 --- a/net/data/cache_tests/list_loop/index +++ b/net/data/cache_tests/list_loop/index diff --git a/net/data/cache_tests/remove_head1/data_0 b/net/data/cache_tests/remove_head1/data_0 Binary files differindex 35fb307..705a7c0 100644 --- a/net/data/cache_tests/remove_head1/data_0 +++ b/net/data/cache_tests/remove_head1/data_0 diff --git a/net/data/cache_tests/remove_head1/data_1 b/net/data/cache_tests/remove_head1/data_1 Binary files differindex 370dabb..b59d85b 100644 --- a/net/data/cache_tests/remove_head1/data_1 +++ b/net/data/cache_tests/remove_head1/data_1 diff --git a/net/data/cache_tests/remove_head1/data_2 b/net/data/cache_tests/remove_head1/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/remove_head1/data_2 +++ b/net/data/cache_tests/remove_head1/data_2 diff --git a/net/data/cache_tests/remove_head1/data_3 b/net/data/cache_tests/remove_head1/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/remove_head1/data_3 +++ b/net/data/cache_tests/remove_head1/data_3 diff --git a/net/data/cache_tests/remove_head1/index b/net/data/cache_tests/remove_head1/index Binary files differindex 3844cbb2..64b93ce 100644 --- a/net/data/cache_tests/remove_head1/index +++ b/net/data/cache_tests/remove_head1/index diff --git a/net/data/cache_tests/remove_head2/data_0 b/net/data/cache_tests/remove_head2/data_0 Binary files differindex 0ee56b7..0baf18c 100644 --- a/net/data/cache_tests/remove_head2/data_0 +++ b/net/data/cache_tests/remove_head2/data_0 diff --git a/net/data/cache_tests/remove_head2/data_1 b/net/data/cache_tests/remove_head2/data_1 Binary files differindex 370dabb..b59d85b 100644 --- a/net/data/cache_tests/remove_head2/data_1 +++ b/net/data/cache_tests/remove_head2/data_1 diff --git a/net/data/cache_tests/remove_head2/data_2 b/net/data/cache_tests/remove_head2/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/remove_head2/data_2 +++ b/net/data/cache_tests/remove_head2/data_2 diff --git a/net/data/cache_tests/remove_head2/data_3 b/net/data/cache_tests/remove_head2/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/remove_head2/data_3 +++ b/net/data/cache_tests/remove_head2/data_3 diff --git a/net/data/cache_tests/remove_head2/index b/net/data/cache_tests/remove_head2/index Binary files differindex 3844cbb2..64b93ce 100644 --- a/net/data/cache_tests/remove_head2/index +++ b/net/data/cache_tests/remove_head2/index diff --git a/net/data/cache_tests/remove_head3/data_0 b/net/data/cache_tests/remove_head3/data_0 Binary files differindex e7252f0..2922728 100644 --- a/net/data/cache_tests/remove_head3/data_0 +++ b/net/data/cache_tests/remove_head3/data_0 diff --git a/net/data/cache_tests/remove_head3/data_1 b/net/data/cache_tests/remove_head3/data_1 Binary files differindex 370dabb..b59d85b 100644 --- a/net/data/cache_tests/remove_head3/data_1 +++ b/net/data/cache_tests/remove_head3/data_1 diff --git a/net/data/cache_tests/remove_head3/data_2 b/net/data/cache_tests/remove_head3/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/remove_head3/data_2 +++ b/net/data/cache_tests/remove_head3/data_2 diff --git a/net/data/cache_tests/remove_head3/data_3 b/net/data/cache_tests/remove_head3/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/remove_head3/data_3 +++ b/net/data/cache_tests/remove_head3/data_3 diff --git a/net/data/cache_tests/remove_head3/index b/net/data/cache_tests/remove_head3/index Binary files differindex 3844cbb2..64b93ce 100644 --- a/net/data/cache_tests/remove_head3/index +++ b/net/data/cache_tests/remove_head3/index diff --git a/net/data/cache_tests/remove_head4/data_0 b/net/data/cache_tests/remove_head4/data_0 Binary files differindex b61d5b1..0f8f735 100644 --- a/net/data/cache_tests/remove_head4/data_0 +++ b/net/data/cache_tests/remove_head4/data_0 diff --git a/net/data/cache_tests/remove_head4/data_1 b/net/data/cache_tests/remove_head4/data_1 Binary files differindex 370dabb..b59d85b 100644 --- a/net/data/cache_tests/remove_head4/data_1 +++ b/net/data/cache_tests/remove_head4/data_1 diff --git a/net/data/cache_tests/remove_head4/data_2 b/net/data/cache_tests/remove_head4/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/remove_head4/data_2 +++ b/net/data/cache_tests/remove_head4/data_2 diff --git a/net/data/cache_tests/remove_head4/data_3 b/net/data/cache_tests/remove_head4/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/remove_head4/data_3 +++ b/net/data/cache_tests/remove_head4/data_3 diff --git a/net/data/cache_tests/remove_head4/index b/net/data/cache_tests/remove_head4/index Binary files differindex 3844cbb2..64b93ce 100644 --- a/net/data/cache_tests/remove_head4/index +++ b/net/data/cache_tests/remove_head4/index diff --git a/net/data/cache_tests/remove_load1/data_0 b/net/data/cache_tests/remove_load1/data_0 Binary files differindex cba61af..b2283fc 100644 --- a/net/data/cache_tests/remove_load1/data_0 +++ b/net/data/cache_tests/remove_load1/data_0 diff --git a/net/data/cache_tests/remove_load1/data_1 b/net/data/cache_tests/remove_load1/data_1 Binary files differindex ba43d7f..1fd9f30 100644 --- a/net/data/cache_tests/remove_load1/data_1 +++ b/net/data/cache_tests/remove_load1/data_1 diff --git a/net/data/cache_tests/remove_load1/data_2 b/net/data/cache_tests/remove_load1/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/remove_load1/data_2 +++ b/net/data/cache_tests/remove_load1/data_2 diff --git a/net/data/cache_tests/remove_load1/data_3 b/net/data/cache_tests/remove_load1/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/remove_load1/data_3 +++ b/net/data/cache_tests/remove_load1/data_3 diff --git a/net/data/cache_tests/remove_load1/index b/net/data/cache_tests/remove_load1/index Binary files differindex f9cedbf..00d45e8 100644 --- a/net/data/cache_tests/remove_load1/index +++ b/net/data/cache_tests/remove_load1/index diff --git a/net/data/cache_tests/remove_load2/data_0 b/net/data/cache_tests/remove_load2/data_0 Binary files differindex fd677c0..8229ee8 100644 --- a/net/data/cache_tests/remove_load2/data_0 +++ b/net/data/cache_tests/remove_load2/data_0 diff --git a/net/data/cache_tests/remove_load2/data_1 b/net/data/cache_tests/remove_load2/data_1 Binary files differindex 45b1b5e..dea2f55 100644 --- a/net/data/cache_tests/remove_load2/data_1 +++ b/net/data/cache_tests/remove_load2/data_1 diff --git a/net/data/cache_tests/remove_load2/data_2 b/net/data/cache_tests/remove_load2/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/remove_load2/data_2 +++ b/net/data/cache_tests/remove_load2/data_2 diff --git a/net/data/cache_tests/remove_load2/data_3 b/net/data/cache_tests/remove_load2/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/remove_load2/data_3 +++ b/net/data/cache_tests/remove_load2/data_3 diff --git a/net/data/cache_tests/remove_load2/index b/net/data/cache_tests/remove_load2/index Binary files differindex aadd59f..6d42289 100644 --- a/net/data/cache_tests/remove_load2/index +++ b/net/data/cache_tests/remove_load2/index diff --git a/net/data/cache_tests/remove_load3/data_0 b/net/data/cache_tests/remove_load3/data_0 Binary files differindex 785d355..67567aa 100644 --- a/net/data/cache_tests/remove_load3/data_0 +++ b/net/data/cache_tests/remove_load3/data_0 diff --git a/net/data/cache_tests/remove_load3/data_1 b/net/data/cache_tests/remove_load3/data_1 Binary files differindex 4bc4671..f793108 100644 --- a/net/data/cache_tests/remove_load3/data_1 +++ b/net/data/cache_tests/remove_load3/data_1 diff --git a/net/data/cache_tests/remove_load3/data_2 b/net/data/cache_tests/remove_load3/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/remove_load3/data_2 +++ b/net/data/cache_tests/remove_load3/data_2 diff --git a/net/data/cache_tests/remove_load3/data_3 b/net/data/cache_tests/remove_load3/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/remove_load3/data_3 +++ b/net/data/cache_tests/remove_load3/data_3 diff --git a/net/data/cache_tests/remove_load3/index b/net/data/cache_tests/remove_load3/index Binary files differindex 2543b60..2d17d55 100644 --- a/net/data/cache_tests/remove_load3/index +++ b/net/data/cache_tests/remove_load3/index diff --git a/net/data/cache_tests/remove_one1/data_0 b/net/data/cache_tests/remove_one1/data_0 Binary files differindex da79243..aafc926 100644 --- a/net/data/cache_tests/remove_one1/data_0 +++ b/net/data/cache_tests/remove_one1/data_0 diff --git a/net/data/cache_tests/remove_one1/data_1 b/net/data/cache_tests/remove_one1/data_1 Binary files differindex c66ca74..72b82f2 100644 --- a/net/data/cache_tests/remove_one1/data_1 +++ b/net/data/cache_tests/remove_one1/data_1 diff --git a/net/data/cache_tests/remove_one1/data_2 b/net/data/cache_tests/remove_one1/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/remove_one1/data_2 +++ b/net/data/cache_tests/remove_one1/data_2 diff --git a/net/data/cache_tests/remove_one1/data_3 b/net/data/cache_tests/remove_one1/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/remove_one1/data_3 +++ b/net/data/cache_tests/remove_one1/data_3 diff --git a/net/data/cache_tests/remove_one1/index b/net/data/cache_tests/remove_one1/index Binary files differindex b5ccc85..1a9488d 100644 --- a/net/data/cache_tests/remove_one1/index +++ b/net/data/cache_tests/remove_one1/index diff --git a/net/data/cache_tests/remove_one2/data_0 b/net/data/cache_tests/remove_one2/data_0 Binary files differindex 120d158..ce16041 100644 --- a/net/data/cache_tests/remove_one2/data_0 +++ b/net/data/cache_tests/remove_one2/data_0 diff --git a/net/data/cache_tests/remove_one2/data_1 b/net/data/cache_tests/remove_one2/data_1 Binary files differindex c66ca74..72b82f2 100644 --- a/net/data/cache_tests/remove_one2/data_1 +++ b/net/data/cache_tests/remove_one2/data_1 diff --git a/net/data/cache_tests/remove_one2/data_2 b/net/data/cache_tests/remove_one2/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/remove_one2/data_2 +++ b/net/data/cache_tests/remove_one2/data_2 diff --git a/net/data/cache_tests/remove_one2/data_3 b/net/data/cache_tests/remove_one2/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/remove_one2/data_3 +++ b/net/data/cache_tests/remove_one2/data_3 diff --git a/net/data/cache_tests/remove_one2/index b/net/data/cache_tests/remove_one2/index Binary files differindex b5ccc85..1a9488d 100644 --- a/net/data/cache_tests/remove_one2/index +++ b/net/data/cache_tests/remove_one2/index diff --git a/net/data/cache_tests/remove_one3/data_0 b/net/data/cache_tests/remove_one3/data_0 Binary files differindex 1ffac7f..5790b9c 100644 --- a/net/data/cache_tests/remove_one3/data_0 +++ b/net/data/cache_tests/remove_one3/data_0 diff --git a/net/data/cache_tests/remove_one3/data_1 b/net/data/cache_tests/remove_one3/data_1 Binary files differindex c66ca74..72b82f2 100644 --- a/net/data/cache_tests/remove_one3/data_1 +++ b/net/data/cache_tests/remove_one3/data_1 diff --git a/net/data/cache_tests/remove_one3/data_2 b/net/data/cache_tests/remove_one3/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/remove_one3/data_2 +++ b/net/data/cache_tests/remove_one3/data_2 diff --git a/net/data/cache_tests/remove_one3/data_3 b/net/data/cache_tests/remove_one3/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/remove_one3/data_3 +++ b/net/data/cache_tests/remove_one3/data_3 diff --git a/net/data/cache_tests/remove_one3/index b/net/data/cache_tests/remove_one3/index Binary files differindex b5ccc85..1a9488d 100644 --- a/net/data/cache_tests/remove_one3/index +++ b/net/data/cache_tests/remove_one3/index diff --git a/net/data/cache_tests/remove_one4/data_0 b/net/data/cache_tests/remove_one4/data_0 Binary files differindex 39247d9..b9d3270 100644 --- a/net/data/cache_tests/remove_one4/data_0 +++ b/net/data/cache_tests/remove_one4/data_0 diff --git a/net/data/cache_tests/remove_one4/data_1 b/net/data/cache_tests/remove_one4/data_1 Binary files differindex c66ca74..72b82f2 100644 --- a/net/data/cache_tests/remove_one4/data_1 +++ b/net/data/cache_tests/remove_one4/data_1 diff --git a/net/data/cache_tests/remove_one4/data_2 b/net/data/cache_tests/remove_one4/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/remove_one4/data_2 +++ b/net/data/cache_tests/remove_one4/data_2 diff --git a/net/data/cache_tests/remove_one4/data_3 b/net/data/cache_tests/remove_one4/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/remove_one4/data_3 +++ b/net/data/cache_tests/remove_one4/data_3 diff --git a/net/data/cache_tests/remove_one4/index b/net/data/cache_tests/remove_one4/index Binary files differindex b5ccc85..1a9488d 100644 --- a/net/data/cache_tests/remove_one4/index +++ b/net/data/cache_tests/remove_one4/index diff --git a/net/data/cache_tests/remove_tail1/data_0 b/net/data/cache_tests/remove_tail1/data_0 Binary files differindex 828c850..d8aadc2 100644 --- a/net/data/cache_tests/remove_tail1/data_0 +++ b/net/data/cache_tests/remove_tail1/data_0 diff --git a/net/data/cache_tests/remove_tail1/data_1 b/net/data/cache_tests/remove_tail1/data_1 Binary files differindex a22705c..7c00477 100644 --- a/net/data/cache_tests/remove_tail1/data_1 +++ b/net/data/cache_tests/remove_tail1/data_1 diff --git a/net/data/cache_tests/remove_tail1/data_2 b/net/data/cache_tests/remove_tail1/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/remove_tail1/data_2 +++ b/net/data/cache_tests/remove_tail1/data_2 diff --git a/net/data/cache_tests/remove_tail1/data_3 b/net/data/cache_tests/remove_tail1/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/remove_tail1/data_3 +++ b/net/data/cache_tests/remove_tail1/data_3 diff --git a/net/data/cache_tests/remove_tail1/index b/net/data/cache_tests/remove_tail1/index Binary files differindex e8c1460..e68e6f3 100644 --- a/net/data/cache_tests/remove_tail1/index +++ b/net/data/cache_tests/remove_tail1/index diff --git a/net/data/cache_tests/remove_tail2/data_0 b/net/data/cache_tests/remove_tail2/data_0 Binary files differindex 527457e0..e21acd2 100644 --- a/net/data/cache_tests/remove_tail2/data_0 +++ b/net/data/cache_tests/remove_tail2/data_0 diff --git a/net/data/cache_tests/remove_tail2/data_1 b/net/data/cache_tests/remove_tail2/data_1 Binary files differindex a22705c..7c00477 100644 --- a/net/data/cache_tests/remove_tail2/data_1 +++ b/net/data/cache_tests/remove_tail2/data_1 diff --git a/net/data/cache_tests/remove_tail2/data_2 b/net/data/cache_tests/remove_tail2/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/remove_tail2/data_2 +++ b/net/data/cache_tests/remove_tail2/data_2 diff --git a/net/data/cache_tests/remove_tail2/data_3 b/net/data/cache_tests/remove_tail2/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/remove_tail2/data_3 +++ b/net/data/cache_tests/remove_tail2/data_3 diff --git a/net/data/cache_tests/remove_tail2/index b/net/data/cache_tests/remove_tail2/index Binary files differindex e8c1460..e68e6f3 100644 --- a/net/data/cache_tests/remove_tail2/index +++ b/net/data/cache_tests/remove_tail2/index diff --git a/net/data/cache_tests/remove_tail3/data_0 b/net/data/cache_tests/remove_tail3/data_0 Binary files differindex 00c1bec..2a73a7d 100644 --- a/net/data/cache_tests/remove_tail3/data_0 +++ b/net/data/cache_tests/remove_tail3/data_0 diff --git a/net/data/cache_tests/remove_tail3/data_1 b/net/data/cache_tests/remove_tail3/data_1 Binary files differindex a22705c..7c00477 100644 --- a/net/data/cache_tests/remove_tail3/data_1 +++ b/net/data/cache_tests/remove_tail3/data_1 diff --git a/net/data/cache_tests/remove_tail3/data_2 b/net/data/cache_tests/remove_tail3/data_2 Binary files differindex 625dd24..5b34782 100644 --- a/net/data/cache_tests/remove_tail3/data_2 +++ b/net/data/cache_tests/remove_tail3/data_2 diff --git a/net/data/cache_tests/remove_tail3/data_3 b/net/data/cache_tests/remove_tail3/data_3 Binary files differindex fd1fac4..de8e29f 100644 --- a/net/data/cache_tests/remove_tail3/data_3 +++ b/net/data/cache_tests/remove_tail3/data_3 diff --git a/net/data/cache_tests/remove_tail3/index b/net/data/cache_tests/remove_tail3/index Binary files differindex e8c1460..e68e6f3 100644 --- a/net/data/cache_tests/remove_tail3/index +++ b/net/data/cache_tests/remove_tail3/index diff --git a/net/disk_cache/disk_format.h b/net/disk_cache/disk_format.h index 4546c88..e23caa9 100644 --- a/net/disk_cache/disk_format.h +++ b/net/disk_cache/disk_format.h @@ -88,7 +88,7 @@ typedef uint32 CacheAddr; const int kIndexTablesize = 0x10000; const uint32 kIndexMagic = 0xC103CAC3; -const uint32 kCurrentVersion = 0x10002; // Version 1.2. +const uint32 kCurrentVersion = 0x10003; // Version 1.3. // Header for the master index file. struct IndexHeader { diff --git a/net/disk_cache/entry_impl.cc b/net/disk_cache/entry_impl.cc index 75ab5ab..58509c1 100644 --- a/net/disk_cache/entry_impl.cc +++ b/net/disk_cache/entry_impl.cc @@ -699,9 +699,9 @@ bool EntryImpl::MoveToLocalBuffer(int index) { bool EntryImpl::ImportSeparateFile(int index, int offset, int buf_len) { if (entry_.Data()->data_size[index] > offset + buf_len) { - entry_.Data()->data_size[index] = offset + buf_len; unreported_size_[index] += offset + buf_len - entry_.Data()->data_size[index]; + entry_.Data()->data_size[index] = offset + buf_len; } if (!MoveToLocalBuffer(index)) diff --git a/net/disk_cache/entry_unittest.cc b/net/disk_cache/entry_unittest.cc index d2eea79..b61c657 100644 --- a/net/disk_cache/entry_unittest.cc +++ b/net/disk_cache/entry_unittest.cc @@ -48,6 +48,7 @@ class DiskCacheEntryTest : public DiskCacheTestBase { void GetKey(); void GrowData(); void TruncateData(); + void ReuseEntry(); void InvalidData(); void DoomEntry(); void DoomedEntry(); @@ -571,6 +572,46 @@ TEST_F(DiskCacheEntryTest, MemoryOnlyTruncateData) { TruncateData(); } +// Write more than the total cache capacity but to a single entry. +void DiskCacheEntryTest::ReuseEntry() { + std::string key1("the first key"); + disk_cache::Entry *entry; + ASSERT_TRUE(cache_->CreateEntry(key1, &entry)); + + entry->Close(); + std::string key2("the second key"); + ASSERT_TRUE(cache_->CreateEntry(key2, &entry)); + + char buffer[20000]; + CacheTestFillBuffer(buffer, sizeof(buffer), false); + + for (int i = 0; i < 15; i++) { + EXPECT_EQ(0, entry->WriteData(0, 0, buffer, 0, NULL, true)); + EXPECT_EQ(20000, entry->WriteData(0, 0, buffer, 20000, NULL, false)); + entry->Close(); + ASSERT_TRUE(cache_->OpenEntry(key2, &entry)); + } + + entry->Close(); + ASSERT_TRUE(cache_->OpenEntry(key1, &entry)) << "have not evicted this entry"; + entry->Close(); +} + +TEST_F(DiskCacheEntryTest, ReuseEntry) { + SetDirectMode(); + SetMaxSize(200 * 1024); + InitCache(); + ReuseEntry(); +} + +TEST_F(DiskCacheEntryTest, MemoryOnlyReuseEntry) { + SetDirectMode(); + SetMemoryOnlyMode(); + SetMaxSize(200 * 1024); + InitCache(); + ReuseEntry(); +} + // Reading somewhere that was not written should return zeros. void DiskCacheEntryTest::InvalidData() { std::string key1("the first key"); |