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

Issue 542733002: Remove void** from disk_cache interface. (Closed)

Created:
6 years, 3 months ago by gavinp
Modified:
6 years, 3 months ago
CC:
chromium-reviews, darin-cc_chromium.org, cbentzel+watch_chromium.org, jam, gavinp+disk_chromium.org, piman+watch_chromium.org, Randy Smith (Not in Mondays), cpu_(ooo_6.6-7.5)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Remove void** from disk_cache interface. Enumeration and iteration were passing around void**. With this CL, we instead use an Iterator object. R=clamy@chromium.org,jkarlin@chromium.org,jsbell@chromium.org BUG=413644 Committed: https://crrev.com/732c8306d4864296511e7a3a252724b1bb34c342 Cr-Commit-Position: refs/heads/master@{#295659}

Patch Set 1 #

Patch Set 2 : cleaner #

Patch Set 3 : more users #

Patch Set 4 : remove superfluous changes #

Patch Set 5 : narrow and add missing file #

Patch Set 6 : narrower #

Patch Set 7 : narrowest, remove unused function #

Total comments: 5

Patch Set 8 : fix windows build #

Patch Set 9 : readability #

Patch Set 10 : one more #

Patch Set 11 : rebase #

Patch Set 12 : more more explicit constructor #

Total comments: 6

Patch Set 13 : rebase on top of upstream CLs #

Patch Set 14 : narrow given upstream #

Total comments: 1

Patch Set 15 : remediating... #

Patch Set 16 : remove build fix #

Patch Set 17 : update comments #

Patch Set 18 : and remove build fix again... #

Patch Set 19 : rebase to trunk (automerge: more fixes coming) #

Patch Set 20 : changes consequent to rebase #

Patch Set 21 : for once and all remove spurious mac sdk changes #

Total comments: 3

Patch Set 22 : self review #

Patch Set 23 : less dumb about teh memories #

Patch Set 24 : now even less dumb #

Total comments: 6

Patch Set 25 : remediate to pasko, add FINAL #

Patch Set 26 : clearer comment #

Patch Set 27 : rebase to trunk (which includes void** based fix to 410276) #

Patch Set 28 : narrower #

Total comments: 20

Patch Set 29 : remediation to rvargas review #

Patch Set 30 : fix EnumerateAndMatchKeys #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+353 lines, -346 lines) Patch
M content/browser/gpu/shader_disk_cache.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +6 lines, -8 lines 0 comments Download
M content/browser/service_worker/service_worker_cache.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 5 chunks +6 lines, -11 lines 0 comments Download
M net/disk_cache/backend_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 29 chunks +75 lines, -79 lines 0 comments Download
M net/disk_cache/blockfile/backend_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +10 lines, -3 lines 0 comments Download
M net/disk_cache/blockfile/backend_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +20 lines, -9 lines 2 comments Download
M net/disk_cache/blockfile/backend_impl_v3.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +3 lines, -3 lines 0 comments Download
M net/disk_cache/blockfile/backend_impl_v3.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +30 lines, -16 lines 0 comments Download
M net/disk_cache/disk_cache.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 3 chunks +24 lines, -25 lines 0 comments Download
M net/disk_cache/disk_cache_test_base.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 3 chunks +13 lines, -1 line 0 comments Download
M net/disk_cache/disk_cache_test_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +17 lines, -5 lines 0 comments Download
M net/disk_cache/entry_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -4 lines 0 comments Download
M net/disk_cache/memory/mem_backend_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +7 lines, -4 lines 0 comments Download
M net/disk_cache/memory/mem_backend_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 3 chunks +34 lines, -26 lines 0 comments Download
M net/disk_cache/simple/simple_backend_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 7 chunks +9 lines, -36 lines 0 comments Download
M net/disk_cache/simple/simple_backend_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 4 chunks +71 lines, -87 lines 0 comments Download
M net/http/mock_http_cache.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +2 lines, -3 lines 0 comments Download
M net/http/mock_http_cache.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +9 lines, -5 lines 0 comments Download
M net/tools/dump_cache/simple_cache_dumper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -6 lines 0 comments Download
M net/tools/dump_cache/simple_cache_dumper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +4 lines, -5 lines 0 comments Download
M net/url_request/view_cache_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -6 lines 0 comments Download
M net/url_request/view_cache_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +5 lines, -4 lines 0 comments Download

Messages

Total messages: 56 (10 generated)
gavinp
clamy, PTAL. jkarling, jsbell: FYI. https://codereview.chromium.org/542733002/diff/120001/net/disk_cache/disk_cache.h File net/disk_cache/disk_cache.h (right): https://codereview.chromium.org/542733002/diff/120001/net/disk_cache/disk_cache.h#newcode79 net/disk_cache/disk_cache.h:79: virtual ~Backend(); As long ...
6 years, 3 months ago (2014-09-04 17:52:53 UTC) #1
clamy
Thanks! It looks _a lot_ better without the void**. The only thing I am a ...
6 years, 3 months ago (2014-09-04 18:22:01 UTC) #2
gavinp
https://chromiumcodereview.appspot.com/542733002/diff/120001/net/disk_cache/blockfile/backend_impl.cc File net/disk_cache/blockfile/backend_impl.cc (right): https://chromiumcodereview.appspot.com/542733002/diff/120001/net/disk_cache/blockfile/backend_impl.cc#newcode1206 net/disk_cache/blockfile/backend_impl.cc:1206: class State : public EnumerationState { On 2014/09/04 18:22:01, ...
6 years, 3 months ago (2014-09-04 18:31:46 UTC) #3
clamy
Thanks. The new version lgtm. https://chromiumcodereview.appspot.com/542733002/diff/120001/net/disk_cache/blockfile/backend_impl.cc File net/disk_cache/blockfile/backend_impl.cc (right): https://chromiumcodereview.appspot.com/542733002/diff/120001/net/disk_cache/blockfile/backend_impl.cc#newcode1206 net/disk_cache/blockfile/backend_impl.cc:1206: class State : public ...
6 years, 3 months ago (2014-09-04 19:01:37 UTC) #4
gavinp
Thanks for the review clamy! On 2014/09/04 19:01:37, clamy wrote: > > By the way, ...
6 years, 3 months ago (2014-09-04 19:21:34 UTC) #5
gavinp
I've just rebased this CL on top of https://codereview.chromium.org/544923002/ and https://codereview.chromium.org/547513002/ , which remove the ...
6 years, 3 months ago (2014-09-05 01:41:32 UTC) #6
rvargas (doing something else)
I'm only looking at the API at this point. https://codereview.chromium.org/542733002/diff/210001/net/disk_cache/disk_cache.cc File net/disk_cache/disk_cache.cc (right): https://codereview.chromium.org/542733002/diff/210001/net/disk_cache/disk_cache.cc#newcode9 net/disk_cache/disk_cache.cc:9: ...
6 years, 3 months ago (2014-09-05 02:01:29 UTC) #8
pasko
https://codereview.chromium.org/542733002/diff/250001/net/disk_cache/disk_cache.h File net/disk_cache/disk_cache.h (right): https://codereview.chromium.org/542733002/diff/250001/net/disk_cache/disk_cache.h#newcode137 net/disk_cache/disk_cache.h:137: // iteration, then the result of this function is ...
6 years, 3 months ago (2014-09-05 09:53:51 UTC) #10
pasko
On 2014/09/05 09:53:51, pasko wrote: > https://codereview.chromium.org/542733002/diff/250001/net/disk_cache/disk_cache.h > File net/disk_cache/disk_cache.h (right): > > https://codereview.chromium.org/542733002/diff/250001/net/disk_cache/disk_cache.h#newcode137 > ...
6 years, 3 months ago (2014-09-05 10:32:42 UTC) #11
cbentzel
On 2014/09/05 10:32:42, pasko wrote: > On 2014/09/05 09:53:51, pasko wrote: > > > https://codereview.chromium.org/542733002/diff/250001/net/disk_cache/disk_cache.h ...
6 years, 3 months ago (2014-09-05 13:40:58 UTC) #12
rvargas (doing something else)
On 2014/09/05 13:40:58, cbentzel wrote: > On 2014/09/05 10:32:42, pasko wrote: > > On 2014/09/05 ...
6 years, 3 months ago (2014-09-06 00:48:28 UTC) #13
gavinp
On 2014/09/05 13:40:58, cbentzel wrote: > On 2014/09/05 10:32:42, pasko wrote: > > On 2014/09/05 ...
6 years, 3 months ago (2014-09-11 23:44:22 UTC) #17
gavinp
On 2014/09/05 13:40:58, cbentzel wrote: > > Also need to deal with how to handle ...
6 years, 3 months ago (2014-09-11 23:50:26 UTC) #18
gavinp
Thank you everyone for your reviews. This upload removes the downcasts per cbentzel's suggestions. I ...
6 years, 3 months ago (2014-09-11 23:57:04 UTC) #19
gavinp
piman, jsbell: OWNERs reviews please of shader and service worker respectively?
6 years, 3 months ago (2014-09-12 00:11:38 UTC) #21
jsbell
I'm not in service_worker/OWNERS on the chromium side, so roping michaeln@ in.
6 years, 3 months ago (2014-09-12 00:16:00 UTC) #23
rvargas (doing something else)
Now that you are asking for owners, this is still NOT LGTM until we at ...
6 years, 3 months ago (2014-09-12 00:24:04 UTC) #24
michaeln
sw lgtm
6 years, 3 months ago (2014-09-12 00:34:04 UTC) #25
piman
gpu LGTM.
6 years, 3 months ago (2014-09-12 02:33:01 UTC) #26
gavinp
On 2014/09/12 00:24:04, rvargas wrote: > Now that you are asking for owners, this is ...
6 years, 3 months ago (2014-09-12 03:34:21 UTC) #27
pasko
LGTM with my proposed changes in comments, keeping a scoped_ptr to the Iterator is less ...
6 years, 3 months ago (2014-09-12 08:10:26 UTC) #28
jkarlin
sw lgtm as well. Thanks for writing this.
6 years, 3 months ago (2014-09-12 11:46:03 UTC) #29
gavinp
pasko, ty for your review. I've done the changes you requested. I also am sad ...
6 years, 3 months ago (2014-09-12 14:15:32 UTC) #30
gavinp
On 2014/09/12 00:24:04, rvargas wrote: > Now that you are asking for owners, this is ...
6 years, 3 months ago (2014-09-12 15:54:46 UTC) #31
clamy
I conducted the following investigation to see if indeed, void** APIs were common in our ...
6 years, 3 months ago (2014-09-12 17:41:05 UTC) #32
jsbell
On 2014/09/12 00:24:04, rvargas wrote: > Now that you are asking for owners, this is ...
6 years, 3 months ago (2014-09-12 18:11:18 UTC) #33
cbentzel
On 2014/09/12 18:11:18, jsbell wrote: > On 2014/09/12 00:24:04, rvargas wrote: > > Now that ...
6 years, 3 months ago (2014-09-12 19:10:53 UTC) #34
gavinp
On 2014/09/12 19:10:53, cbentzel wrote: > On 2014/09/12 18:11:18, jsbell wrote: > > On 2014/09/12 ...
6 years, 3 months ago (2014-09-15 18:58:33 UTC) #36
cbentzel
It seems like there's rough consensus that most folks (at least on this CL) prefer ...
6 years, 3 months ago (2014-09-18 00:20:53 UTC) #37
cbentzel
On 2014/09/18 00:20:53, cbentzel wrote: > It seems like there's rough consensus that most folks ...
6 years, 3 months ago (2014-09-18 00:27:56 UTC) #38
cbentzel
On 2014/09/18 00:20:53, cbentzel wrote: > It seems like there's rough consensus that most folks ...
6 years, 3 months ago (2014-09-18 00:28:01 UTC) #39
rvargas (doing something else)
On 2014/09/18 00:28:01, cbentzel wrote: > On 2014/09/18 00:20:53, cbentzel wrote: > > It seems ...
6 years, 3 months ago (2014-09-18 00:57:37 UTC) #41
cbentzel
On 2014/09/18 00:57:37, rvargas wrote: > On 2014/09/18 00:28:01, cbentzel wrote: > > On 2014/09/18 ...
6 years, 3 months ago (2014-09-18 01:19:28 UTC) #42
cbentzel
On 2014/09/18 00:57:37, rvargas wrote: > On 2014/09/18 00:28:01, cbentzel wrote: > > On 2014/09/18 ...
6 years, 3 months ago (2014-09-18 01:19:32 UTC) #43
rvargas (doing something else)
To clarify a little bit more my previous comment, I usually don't read other's reviewers ...
6 years, 3 months ago (2014-09-18 02:32:12 UTC) #44
pasko
On 2014/09/18 02:32:12, rvargas wrote: > To clarify a little bit more my previous comment, ...
6 years, 3 months ago (2014-09-18 07:44:29 UTC) #45
darin (slow to review)
On 2014/09/18 07:44:29, pasko wrote: > On 2014/09/18 02:32:12, rvargas wrote: > > To clarify ...
6 years, 3 months ago (2014-09-18 07:58:52 UTC) #46
gavinp
TY for your review rvargas. I'll reply to comments on the code here in the ...
6 years, 3 months ago (2014-09-18 18:13:05 UTC) #47
jkarlin
https://codereview.chromium.org/542733002/diff/610001/net/disk_cache/backend_unittest.cc File net/disk_cache/backend_unittest.cc (right): https://codereview.chromium.org/542733002/diff/610001/net/disk_cache/backend_unittest.cc#newcode84 net/disk_cache/backend_unittest.cc:84: const scoped_ptr<TestIterator>& iter, On 2014/09/18 18:13:04, gavinp wrote: > ...
6 years, 3 months ago (2014-09-18 18:41:34 UTC) #48
gavinp
https://codereview.chromium.org/542733002/diff/610001/net/disk_cache/backend_unittest.cc File net/disk_cache/backend_unittest.cc (right): https://codereview.chromium.org/542733002/diff/610001/net/disk_cache/backend_unittest.cc#newcode84 net/disk_cache/backend_unittest.cc:84: const scoped_ptr<TestIterator>& iter, On 2014/09/18 18:41:34, jkarlin wrote: > ...
6 years, 3 months ago (2014-09-18 19:00:40 UTC) #49
rvargas (doing something else)
lgtm, thanks. pasko@: > I am surprised the explicit practice of reviewing and ignoring other ...
6 years, 3 months ago (2014-09-19 01:26:52 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/542733002/650001
6 years, 3 months ago (2014-09-19 03:54:53 UTC) #52
commit-bot: I haz the power
Committed patchset #30 (id:650001) as 9541f4472b2b567f211844cb6a6b48a0010601c2
6 years, 3 months ago (2014-09-19 04:20:41 UTC) #53
commit-bot: I haz the power
Patchset 30 (id:??) landed as https://crrev.com/732c8306d4864296511e7a3a252724b1bb34c342 Cr-Commit-Position: refs/heads/master@{#295659}
6 years, 3 months ago (2014-09-19 04:21:14 UTC) #54
vasilii
A revert of this CL (patchset #30 id:650001) has been created in https://codereview.chromium.org/585833002/ by vasilii@chromium.org. ...
6 years, 3 months ago (2014-09-19 08:18:32 UTC) #55
gavinp
6 years, 3 months ago (2014-09-19 16:09:35 UTC) #56
Message was sent while issue was closed.
See https://codereview.chromium.org/583283002/ for reland.

https://codereview.chromium.org/542733002/diff/650001/net/disk_cache/blockfil...
File net/disk_cache/blockfile/backend_impl.cc (left):

https://codereview.chromium.org/542733002/diff/650001/net/disk_cache/blockfil...
net/disk_cache/blockfile/backend_impl.cc:620: iterator.reset(new
Rankings::Iterator(&rankings_));
Aha, the void** was really a scoped_ptr, very similar to the implementation in
simple cache that was leaking.

https://codereview.chromium.org/542733002/diff/650001/net/disk_cache/blockfil...
net/disk_cache/blockfile/backend_impl.cc:1261:
background_queue_.EndEnumeration(*iter);
This turns out to be important.

Powered by Google App Engine
This is Rietveld 408576698