Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Issue 300043: MockAppCacheStorage implemenation (Closed)

Created:
11 years, 2 months ago by michaeln
Modified:
9 years, 7 months ago
Reviewers:
jennb
CC:
chromium-reviews_googlegroups.com, darin (slow to review)
Visibility:
Public.

Description

MockAppCacheStorage implemention This is a quick and easy 'mock' implementation of the storage interface that doesn't put anything to disk. We simply add an extra reference to objects when they're put in storage, and remove the extra reference when they are removed from storage. Responses are never really removed from the in-memory disk cache. Delegate callbacks are made asyncly to appropiately mimic what will happen with a real disk-backed storage impl that involves IO on a background thread. This is for use in unit tests and to initially bring up the appcache related layout tests. TEST=mock_appcache_storage_unittest.cc BUG=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=30017

Patch Set 1 #

Total comments: 1

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 1

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Total comments: 46

Patch Set 8 : '' #

Patch Set 9 : '' #

Total comments: 28

Patch Set 10 : '' #

Total comments: 2

Patch Set 11 : '' #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+689 lines, -145 lines) Patch
M webkit/appcache/appcache_entry.h View 3 chunks +13 lines, -3 lines 0 comments Download
M webkit/appcache/appcache_group.h View 1 2 chunks +7 lines, -8 lines 0 comments Download
M webkit/appcache/appcache_response_unittest.cc View 2 chunks +0 lines, -43 lines 0 comments Download
M webkit/appcache/appcache_storage.h View 1 2 3 6 7 chunks +8 lines, -24 lines 0 comments Download
M webkit/appcache/appcache_storage_unittest.cc View 3 4 5 6 7 8 4 chunks +47 lines, -4 lines 0 comments Download
M webkit/appcache/mock_appcache_storage.h View 1 2 3 4 5 6 7 8 9 4 chunks +43 lines, -8 lines 0 comments Download
M webkit/appcache/mock_appcache_storage.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +212 lines, -55 lines 1 comment Download
A webkit/appcache/mock_appcache_storage_unittest.cc View 6 7 8 9 10 1 chunk +358 lines, -0 lines 0 comments Download
M webkit/tools/test_shell/test_shell.gyp View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
michaeln
Existing unit tests pass with this. Remaining todo... * work up unittests for this new ...
11 years, 2 months ago (2009-10-21 22:35:25 UTC) #1
michaeln
http://codereview.chromium.org/300043/diff/1/4 File webkit/appcache/mock_appcache_storage.cc (right): http://codereview.chromium.org/300043/diff/1/4#newcode66 Line 66: // caches only have one ref ah... i ...
11 years, 2 months ago (2009-10-21 22:43:50 UTC) #2
michaeln
> http://codereview.chromium.org/300043/diff/1/4#newcode66 > Line 66: // caches only have one ref > ah... i want ...
11 years, 2 months ago (2009-10-21 23:08:13 UTC) #3
michaeln
http://codereview.chromium.org/300043/diff/6005/6007 File webkit/appcache/appcache_storage.h (right): http://codereview.chromium.org/300043/diff/6005/6007#newcode298 Line 298: // TODO(michaeln): Maybe? maybe not?
11 years, 2 months ago (2009-10-21 23:29:54 UTC) #4
michaeln
i still need to clean this up and add unit tests... no need to look ...
11 years, 2 months ago (2009-10-22 06:27:26 UTC) #5
michaeln
Hi Jenn, I think the new code is ready for review, i'm still working up ...
11 years, 2 months ago (2009-10-22 22:13:35 UTC) #6
michaeln
New snapshot, stubs for the handful of tests i think i need to write, but ...
11 years, 2 months ago (2009-10-22 22:25:19 UTC) #7
michaeln
New snapshots, added unit tests
11 years, 2 months ago (2009-10-23 04:02:42 UTC) #8
michaeln
other than the gcc'ism... i think this is ready to go... please take a look ...
11 years, 2 months ago (2009-10-23 04:49:07 UTC) #9
michaeln
http://codereview.chromium.org/300043/diff/15002/15005 File webkit/appcache/mock_appcache_storage.cc (right): http://codereview.chromium.org/300043/diff/15002/15005#newcode252 Line 252: bool MockAppCacheStorage::ShouldGroupLoadAppearAsync( should i add these comments here... ...
11 years, 2 months ago (2009-10-23 05:00:50 UTC) #10
jennb
Didn't get to look at mock_appcache_storage_unittest.cc yet. Will get to it later today. http://codereview.chromium.org/300043/diff/15002/15008 File ...
11 years, 2 months ago (2009-10-23 18:27:34 UTC) #11
michaeln
http://codereview.chromium.org/300043/diff/15002/15008 File webkit/appcache/appcache_storage_unittest.cc (right): http://codereview.chromium.org/300043/diff/15002/15008#newcode9 Line 9: #include "webkit/appcache/appcache_storage.h" On 2009/10/23 18:27:34, jennb wrote: > ...
11 years, 2 months ago (2009-10-23 19:42:08 UTC) #12
michaeln
New snapshot... http://codereview.chromium.org/300043/diff/15002/15005 File webkit/appcache/mock_appcache_storage.cc (right): http://codereview.chromium.org/300043/diff/15002/15005#newcode124 Line 124: // We don't bother with removing ...
11 years, 2 months ago (2009-10-23 21:09:25 UTC) #13
michaeln
I've taken care of these things locally. http://codereview.chromium.org/300043/diff/16002/16005 File webkit/appcache/mock_appcache_storage.cc (right): http://codereview.chromium.org/300043/diff/16002/16005#newcode144 Line 144: // ...
11 years, 2 months ago (2009-10-23 21:12:42 UTC) #14
jennb
http://codereview.chromium.org/300043/diff/16002/16005 File webkit/appcache/mock_appcache_storage.cc (right): http://codereview.chromium.org/300043/diff/16002/16005#newcode276 Line 276: // If any of this group's caches don't ...
11 years, 2 months ago (2009-10-23 22:22:23 UTC) #15
michaeln
New snapshot. http://codereview.chromium.org/300043/diff/16002/16005 File webkit/appcache/mock_appcache_storage.cc (right): http://codereview.chromium.org/300043/diff/16002/16005#newcode276 Line 276: // If any of this group's ...
11 years, 2 months ago (2009-10-23 22:50:23 UTC) #16
jennb
LGTM Rest are small and so is your figuring out the ShouldGroupLoadAppearAsync comment/code correction. http://codereview.chromium.org/300043/diff/16002/16010 ...
11 years, 2 months ago (2009-10-23 23:01:33 UTC) #17
michaeln
Thnx http://codereview.chromium.org/300043/diff/18003/18011 File webkit/appcache/mock_appcache_storage_unittest.cc (right): http://codereview.chromium.org/300043/diff/18003/18011#newcode212 Line 212: // and hold a ref to the ...
11 years, 2 months ago (2009-10-24 00:32:11 UTC) #18
michaeln
11 years, 2 months ago (2009-10-24 00:36:06 UTC) #19
http://codereview.chromium.org/300043/diff/16013/16016
File webkit/appcache/mock_appcache_storage.cc (right):

http://codereview.chromium.org/300043/diff/16013/16016#newcode276
Line 276: // if loading the newest cache should appear async, so to must this
changed locally to... "so too must the"

Powered by Google App Engine
This is Rietveld 408576698