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

Issue 12794003: Initialize the simple cache backend at runtime. (Closed)

Created:
7 years, 9 months ago by pasko-google - do not use
Modified:
7 years, 8 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, gavinp+disk_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Initialize the simple cache backend at runtime. We will need to choose the backend at runtime for A/B testing. This change is the first step towards backend comparisons: it moves the logic of choosing among cache backends to a single point (cache_creator.cc) and makes it logically separate from BackendImpl. Next step would be to inject performance-analyzer backend into this cache backend choice logic. The analyzer is going to be under a compile-time flag. With this change the Simple Cache Backend operation gets enabled when the "SimpleCacheTrial" experiment is set. Cache Initialization. The Simple Cache Backend now shares the common initialization/cleanup code. So it can delete inconsistent cache, cache of a different version etc asynchronously. It is just a positive side-effect of moving the backend choice to a single point. The CacheCreator with almost no change. To see the difference: shell> out/Debug/chrome --enable-logging=stderr --v=1 \ --user-data-dir=/tmp/unique --use-simple-cache-backend=on \ http://url 2>&1 | grep "Simple Cache" BUG=173390, 173384 TBR=maruel Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=191830

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : fixed a test #

Patch Set 5 : . #

Patch Set 6 : . #

Total comments: 28

Patch Set 7 : . #

Patch Set 8 : #

Patch Set 9 : #

Total comments: 1

Patch Set 10 : #

Patch Set 11 : #

Total comments: 7

Patch Set 12 : #

Total comments: 32

Patch Set 13 : #

Patch Set 14 : upload from git #

Total comments: 5

Patch Set 15 : #

Total comments: 57

Patch Set 16 : #

Total comments: 2

Patch Set 17 : #

Patch Set 18 : #

Patch Set 19 : #

Patch Set 20 : #

Patch Set 21 : #

Patch Set 22 : uploading the same code from git for CQ happiness #

Patch Set 23 : exclude ScopedAllowIO in net/disk_cache/cache_util.cc, it is not new code #

Patch Set 24 : rebased to latest, auto-merged net.gyp #

Unified diffs Side-by-side diffs Delta from patch set Stats (+356 lines, -382 lines) Patch
M PRESUBMIT.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -0 lines 0 comments Download
M net/disk_cache/backend_impl.h View 8 9 10 11 12 13 15 16 17 18 19 20 21 1 chunk +0 lines, -8 lines 0 comments Download
M net/disk_cache/backend_impl.cc View 1 2 3 4 5 6 8 9 10 11 12 13 15 16 17 18 19 20 21 7 chunks +0 lines, -209 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 43 chunks +42 lines, -92 lines 0 comments Download
A net/disk_cache/cache_creator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +116 lines, -0 lines 0 comments Download
M net/disk_cache/cache_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +41 lines, -0 lines 0 comments Download
A net/disk_cache/cache_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +93 lines, -0 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 4 chunks +6 lines, -5 lines 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 7 chunks +47 lines, -32 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 15 16 17 18 19 20 21 19 chunks +0 lines, -23 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 1 chunk +1 line, -2 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 1 chunk +0 lines, -1 line 0 comments Download
M net/net.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +2 lines, -6 lines 0 comments Download
M net/tools/crash_cache/crash_cache.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +7 lines, -4 lines 0 comments Download

Messages

Total messages: 33 (0 generated)
pasko-google - do not use
7 years, 9 months ago (2013-03-13 07:01:58 UTC) #1
gavinp
Looks good. My requests are mostly nits, except for the about:flags, which would be nice ...
7 years, 9 months ago (2013-03-13 18:36:12 UTC) #2
rvargas (doing something else)
After a superficial review: - Moving creation code to a separate file++ - Command line-- ...
7 years, 9 months ago (2013-03-13 19:36:00 UTC) #3
pasko-google - do not use
On 2013/03/13 19:36:00, rvargas wrote: > Now testing. This CL also modifies tests that are ...
7 years, 9 months ago (2013-03-18 08:23:51 UTC) #4
pasko-google - do not use
OK, I did not figure out (yet) why the new function cannot be found at ...
7 years, 9 months ago (2013-03-18 15:47:07 UTC) #5
pasko-google - do not use
o-kay, .. in Russia we have common wisdom: "Things sort out better in the morning". ...
7 years, 9 months ago (2013-03-18 17:53:17 UTC) #6
rvargas (doing something else)
At this point I don't think we should have a shared internal method for creation ...
7 years, 9 months ago (2013-03-18 22:25:25 UTC) #7
rvargas (doing something else)
https://codereview.chromium.org/12794003/diff/19001/net/disk_cache/disk_cache.h File net/disk_cache/disk_cache.h (right): https://codereview.chromium.org/12794003/diff/19001/net/disk_cache/disk_cache.h#newcode74 net/disk_cache/disk_cache.h:74: bool DelayedCacheCleanup(const base::FilePath& full_path); In case it is not ...
7 years, 9 months ago (2013-03-18 22:27:16 UTC) #8
pasko-google - do not use
Ricardo, with this upload I skipped smaller nits and mainly addressed the testing suggestions and ...
7 years, 9 months ago (2013-03-25 19:35:27 UTC) #9
rvargas (doing something else)
> * Now it is possible to enable some tests with the Simple > Backend ...
7 years, 9 months ago (2013-03-25 22:06:04 UTC) #10
pasko-google - do not use
https://codereview.chromium.org/12794003/diff/7011/net/disk_cache/cache_creator.cc File net/disk_cache/cache_creator.cc (right): https://codereview.chromium.org/12794003/diff/7011/net/disk_cache/cache_creator.cc#newcode64 net/disk_cache/cache_creator.cc:64: bool DelayedCacheCleanup(const base::FilePath& full_path) { On 2013/03/25 22:06:04, rvargas ...
7 years, 9 months ago (2013-03-26 16:54:57 UTC) #11
pasko-google - do not use
oh shoot, please don't look at this yet, my svn/gcl client is busted, I got ...
7 years, 9 months ago (2013-03-26 16:57:21 UTC) #12
pasko-google - do not use
On 2013/03/26 16:57:21, pasko wrote: > oh shoot, please don't look at this yet, my ...
7 years, 9 months ago (2013-03-26 17:25:12 UTC) #13
rvargas (doing something else)
https://codereview.chromium.org/12794003/diff/7011/net/disk_cache/cache_creator.cc File net/disk_cache/cache_creator.cc (right): https://codereview.chromium.org/12794003/diff/7011/net/disk_cache/cache_creator.cc#newcode97 net/disk_cache/cache_creator.cc:97: CacheCreator::CacheCreator( On 2013/03/26 16:54:57, pasko wrote: > On 2013/03/25 ...
7 years, 9 months ago (2013-03-26 18:30:00 UTC) #14
pasko-google - do not use
PTAL please Now it is two files that has code moved to: cache_creator.cc, cache_util.cc. Re-creating ...
7 years, 9 months ago (2013-03-27 20:36:08 UTC) #15
rvargas (doing something else)
nit on the description: "Decide to initialize the simple cache" -> "Initialize the " (I ...
7 years, 9 months ago (2013-03-28 03:12:45 UTC) #16
pasko-google - do not use
I am going to address the low-level comments now. Publishing the high-level thoughts now without ...
7 years, 9 months ago (2013-03-28 18:19:57 UTC) #17
rvargas (doing something else)
btw, I would not expect this change to require clobbering of bots because all uses ...
7 years, 9 months ago (2013-03-28 18:47:30 UTC) #18
pasko-google - do not use
On 2013/03/28 18:47:30, rvargas wrote: > I still think it is better to write unit ...
7 years, 9 months ago (2013-03-28 19:23:49 UTC) #19
pasko-google - do not use
https://codereview.chromium.org/12794003/diff/67001/net/disk_cache/backend_unittest.cc File net/disk_cache/backend_unittest.cc (right): https://codereview.chromium.org/12794003/diff/67001/net/disk_cache/backend_unittest.cc#newcode369 net/disk_cache/backend_unittest.cc:369: base::Thread::Options(MessageLoop::TYPE_IO, 0))); On 2013/03/28 03:12:45, rvargas wrote: > nit: ...
7 years, 9 months ago (2013-03-28 21:41:42 UTC) #20
pasko-google - do not use
On 2013/03/28 19:23:49, pasko wrote: > On 2013/03/28 18:47:30, rvargas wrote: > > I still ...
7 years, 9 months ago (2013-03-28 21:45:01 UTC) #21
rvargas (doing something else)
LGTM https://codereview.chromium.org/12794003/diff/67001/net/disk_cache/cache_creator.cc File net/disk_cache/cache_creator.cc (right): https://codereview.chromium.org/12794003/diff/67001/net/disk_cache/cache_creator.cc#newcode108 net/disk_cache/cache_creator.cc:108: CacheCreator* creator = new CacheCreator(path, force, max_bytes, type, ...
7 years, 9 months ago (2013-03-28 22:30:21 UTC) #22
pasko-google - do not use
trying to get more input earlier, posting some replies without changes changes to the code.. ...
7 years, 9 months ago (2013-03-29 02:20:26 UTC) #23
rvargas (doing something else)
https://codereview.chromium.org/12794003/diff/67001/net/disk_cache/cache_creator.cc File net/disk_cache/cache_creator.cc (right): https://codereview.chromium.org/12794003/diff/67001/net/disk_cache/cache_creator.cc#newcode108 net/disk_cache/cache_creator.cc:108: CacheCreator* creator = new CacheCreator(path, force, max_bytes, type, kNone, ...
7 years, 9 months ago (2013-03-29 06:49:22 UTC) #24
pasko-google - do not use
I made a few small changes: naming and expoerting the SimpleBackendImpl for windows. Letting the ...
7 years, 8 months ago (2013-03-29 20:05:12 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pasko@google.com/12794003/125001
7 years, 8 months ago (2013-03-29 20:05:41 UTC) #26
commit-bot: I haz the power
Failed to apply patch for net/disk_cache/cache_creator.cc: While running patch -p0 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 8 months ago (2013-03-29 20:05:45 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pasko@google.com/12794003/140001
7 years, 8 months ago (2013-04-01 12:55:57 UTC) #28
commit-bot: I haz the power
Presubmit check for 12794003-140001 failed and returned exit status 1. INFO:root:Found 13 file(s). Running presubmit ...
7 years, 8 months ago (2013-04-01 12:56:02 UTC) #29
pasko-google - do not use
On 2013/04/01 12:56:02, I haz the power (commit-bot) wrote: > Presubmit check for 12794003-140001 failed ...
7 years, 8 months ago (2013-04-01 13:27:57 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pasko@google.com/12794003/146001
7 years, 8 months ago (2013-04-02 14:38:48 UTC) #31
commit-bot: I haz the power
Change committed as 191830
7 years, 8 months ago (2013-04-02 15:11:05 UTC) #32
M-A Ruel
7 years, 8 months ago (2013-04-02 15:18:32 UTC) #33
Message was sent while issue was closed.
PRESUBMIT.py change lgtm

Powered by Google App Engine
This is Rietveld 408576698