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

Issue 10832241: Drive: Removes unused cache files after the initial feed fetch. (Closed)

Created:
8 years, 4 months ago by yoshiki
Modified:
8 years, 3 months ago
Reviewers:
achuithb, satorux1
CC:
chromium-reviews, achuith+watch_chromium.org, oshima+watch_chromium.org, stevenjb+watch_chromium.org, nkostylev+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

Drive: Removes unused cache files after the initial feed fetch. BUG=128088 TEST=manual TBR=ben@chromium.org # for chrome/chrome_browser.gypi and chrome/chrome_tests.gypi Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=152328 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=154430

Patch Set 1 #

Patch Set 2 : Review fix (#2) #

Total comments: 6

Patch Set 3 : Review fix (#4) #

Patch Set 4 : rebase #

Patch Set 5 : rebase #

Patch Set 6 : Adding scoped_ptr<StaleCacheFilesRemover> to GDataFileSystem #

Total comments: 46

Patch Set 7 : Review (#7) fix & add unit_test. #

Total comments: 15

Patch Set 8 : Review fix (#10) #

Total comments: 2

Patch Set 9 : Review fix (#12) #

Patch Set 10 : Review fix (#15) #

Patch Set 11 : rebase #

Patch Set 12 : rebase #

Patch Set 13 : Pretend we have enough space on creating a cache. #

Patch Set 14 : rebase #

Patch Set 15 : Fix the memory leak. #

Total comments: 2

Patch Set 16 : rebase #

Patch Set 17 : Move the ownership of |stale_cache_files_remover_| to GDataSystemService (reverting Patch Set 15) #

Total comments: 14

Patch Set 18 : rebase #

Patch Set 19 : Review Fix (#26) #

Patch Set 20 : Fix the build error. #

Total comments: 6

Patch Set 21 : Review fix (#28) #

Patch Set 22 : rebase #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+406 lines, -0 lines) Patch
A chrome/browser/chromeos/gdata/stale_cache_files_remover.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +65 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/gdata/stale_cache_files_remover.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +113 lines, -0 lines 1 comment Download
A chrome/browser/chromeos/gdata/stale_cache_files_remover_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +225 lines, -0 lines 0 comments Download
M chrome/chrome_browser_chromeos.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi 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, -0 lines 0 comments Download

Messages

Total messages: 35 (0 generated)
yoshiki
8 years, 4 months ago (2012-08-10 02:56:06 UTC) #1
satorux1
Thank you for taking this class, but I think this approach is rather overkill. DriveCacheScrubService, ...
8 years, 4 months ago (2012-08-10 17:14:46 UTC) #2
yoshiki
Done. PTAL On 2012/08/10 17:14:46, satorux1 wrote: > Thank you for taking this class, but ...
8 years, 4 months ago (2012-08-10 23:02:28 UTC) #3
satorux1
http://codereview.chromium.org/10832241/diff/8001/chrome/browser/chromeos/gdata/gdata_file_system.cc File chrome/browser/chromeos/gdata/gdata_file_system.cc (right): http://codereview.chromium.org/10832241/diff/8001/chrome/browser/chromeos/gdata/gdata_file_system.cc#newcode2823 chrome/browser/chromeos/gdata/gdata_file_system.cc:2823: remover->ScrubCacheAfterDelay(); I think "scrub" is not a popular verb ...
8 years, 4 months ago (2012-08-10 23:47:40 UTC) #4
yoshiki
On 2012/08/10 23:47:40, satorux1 wrote: http://codereview.chromium.org/10832241/diff/8001/chrome/browser/chromeos/gdata/stale_cache_files_remover.cc#newcode92 > chrome/browser/chromeos/gdata/stale_cache_files_remover.cc:92: void > StaleCacheFilesRemover::ScrubCache() { > Because it's ...
8 years, 4 months ago (2012-08-11 00:26:34 UTC) #5
satorux1
On 2012/08/11 00:26:34, yoshiki wrote: > On 2012/08/10 23:47:40, satorux1 wrote: > http://codereview.chromium.org/10832241/diff/8001/chrome/browser/chromeos/gdata/stale_cache_files_remover.cc#newcode92 > > ...
8 years, 4 months ago (2012-08-11 02:00:36 UTC) #6
satorux1
http://codereview.chromium.org/10832241/diff/3002/chrome/browser/chromeos/gdata/gdata_file_system.cc File chrome/browser/chromeos/gdata/gdata_file_system.cc (right): http://codereview.chromium.org/10832241/diff/3002/chrome/browser/chromeos/gdata/gdata_file_system.cc#newcode2845 chrome/browser/chromeos/gdata/gdata_file_system.cc:2845: stale_cache_file_remover_->Start(); I suggest you to call this here, but ...
8 years, 4 months ago (2012-08-14 17:19:37 UTC) #7
satorux1
Forgot to mention but please write unit tests.
8 years, 4 months ago (2012-08-15 02:13:46 UTC) #8
yoshiki
http://codereview.chromium.org/10832241/diff/3002/chrome/browser/chromeos/gdata/gdata_file_system.cc File chrome/browser/chromeos/gdata/gdata_file_system.cc (right): http://codereview.chromium.org/10832241/diff/3002/chrome/browser/chromeos/gdata/gdata_file_system.cc#newcode2845 chrome/browser/chromeos/gdata/gdata_file_system.cc:2845: stale_cache_file_remover_->Start(); On 2012/08/14 17:19:37, satorux1 wrote: > I suggest ...
8 years, 4 months ago (2012-08-16 07:39:55 UTC) #9
satorux1
Thank you for writing tests! http://codereview.chromium.org/10832241/diff/10002/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc File chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc (right): http://codereview.chromium.org/10832241/diff/10002/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc#newcode77 chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc:77: void VerifyCacheFileState(GDataFileError error, function ...
8 years, 4 months ago (2012-08-16 11:03:53 UTC) #10
yoshiki
http://codereview.chromium.org/10832241/diff/10002/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc File chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc (right): http://codereview.chromium.org/10832241/diff/10002/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc#newcode77 chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc:77: void VerifyCacheFileState(GDataFileError error, On 2012/08/16 11:03:53, satorux1 wrote: > ...
8 years, 4 months ago (2012-08-17 03:49:58 UTC) #11
satorux1
http://codereview.chromium.org/10832241/diff/10002/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc File chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc (right): http://codereview.chromium.org/10832241/diff/10002/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc#newcode2663 chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc:2663: run_loop.RunUntilIdle(); On 2012/08/17 03:49:59, yoshiki wrote: > On 2012/08/16 ...
8 years, 4 months ago (2012-08-17 10:38:41 UTC) #12
yoshiki
http://codereview.chromium.org/10832241/diff/10002/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc File chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc (right): http://codereview.chromium.org/10832241/diff/10002/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc#newcode2663 chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc:2663: run_loop.RunUntilIdle(); On 2012/08/17 10:38:41, satorux1 wrote: > On 2012/08/17 ...
8 years, 4 months ago (2012-08-18 03:31:51 UTC) #13
satorux1
http://codereview.chromium.org/10832241/diff/10002/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc File chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc (right): http://codereview.chromium.org/10832241/diff/10002/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc#newcode2663 chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc:2663: run_loop.RunUntilIdle(); On 2012/08/18 03:31:51, yoshiki wrote: > On 2012/08/17 ...
8 years, 4 months ago (2012-08-18 11:33:16 UTC) #14
satorux1
LGTM with requests: http://codereview.chromium.org/10832241/diff/10002/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc File chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc (right): http://codereview.chromium.org/10832241/diff/10002/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc#newcode15 chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc:15: #include "base/run_loop.h" please remove. see below. ...
8 years, 4 months ago (2012-08-19 05:24:59 UTC) #15
yoshiki
Thanks for your review. I'll commit this after rebase. http://codereview.chromium.org/10832241/diff/10002/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc File chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc (right): http://codereview.chromium.org/10832241/diff/10002/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc#newcode15 chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc:15: ...
8 years, 4 months ago (2012-08-20 02:39:36 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yoshiki@chromium.org/10832241/3010
8 years, 4 months ago (2012-08-20 03:55:37 UTC) #17
commit-bot: I haz the power
Try job failure for 10832241-3010 (retry) on linux_chromeos for step "compile" (clobber build). It's a ...
8 years, 4 months ago (2012-08-20 04:21:29 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yoshiki@chromium.org/10832241/3012
8 years, 4 months ago (2012-08-20 11:05:09 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yoshiki@chromium.org/10832241/16003
8 years, 4 months ago (2012-08-20 13:08:17 UTC) #20
commit-bot: I haz the power
Change committed as 152328
8 years, 4 months ago (2012-08-20 15:27:35 UTC) #21
yoshiki
Satoru-san, could you take a look at the change of gdata_file_system.h again? This CL has ...
8 years, 4 months ago (2012-08-21 11:09:14 UTC) #22
satorux1
http://codereview.chromium.org/10832241/diff/8008/chrome/browser/chromeos/gdata/gdata_file_system.h File chrome/browser/chromeos/gdata/gdata_file_system.h (right): http://codereview.chromium.org/10832241/diff/8008/chrome/browser/chromeos/gdata/gdata_file_system.h#newcode839 chrome/browser/chromeos/gdata/gdata_file_system.h:839: // be constructed before them and be destructed after ...
8 years, 4 months ago (2012-08-21 20:57:06 UTC) #23
satorux1
http://codereview.chromium.org/10832241/diff/8008/chrome/browser/chromeos/gdata/gdata_file_system.h File chrome/browser/chromeos/gdata/gdata_file_system.h (right): http://codereview.chromium.org/10832241/diff/8008/chrome/browser/chromeos/gdata/gdata_file_system.h#newcode839 chrome/browser/chromeos/gdata/gdata_file_system.h:839: // be constructed before them and be destructed after ...
8 years, 4 months ago (2012-08-21 21:29:06 UTC) #24
yoshiki
Sorry for delayed response. On 2012/08/21 21:29:06, satorux1 wrote: > http://codereview.chromium.org/10832241/diff/8008/chrome/browser/chromeos/gdata/gdata_file_system.h > File chrome/browser/chromeos/gdata/gdata_file_system.h (right): ...
8 years, 3 months ago (2012-08-28 15:26:28 UTC) #25
satorux1
http://codereview.chromium.org/10832241/diff/28002/chrome/browser/chromeos/gdata/stale_cache_files_remover_unittest.cc File chrome/browser/chromeos/gdata/stale_cache_files_remover_unittest.cc (right): http://codereview.chromium.org/10832241/diff/28002/chrome/browser/chromeos/gdata/stale_cache_files_remover_unittest.cc#newcode58 chrome/browser/chromeos/gdata/stale_cache_files_remover_unittest.cc:58: void GetEntryInfoByPathCallback( I thought we had this in gdata_test_util.h. ...
8 years, 3 months ago (2012-08-28 15:38:02 UTC) #26
yoshiki
http://codereview.chromium.org/10832241/diff/28002/chrome/browser/chromeos/gdata/stale_cache_files_remover_unittest.cc File chrome/browser/chromeos/gdata/stale_cache_files_remover_unittest.cc (right): http://codereview.chromium.org/10832241/diff/28002/chrome/browser/chromeos/gdata/stale_cache_files_remover_unittest.cc#newcode58 chrome/browser/chromeos/gdata/stale_cache_files_remover_unittest.cc:58: void GetEntryInfoByPathCallback( On 2012/08/28 15:38:02, satorux1 wrote: > I ...
8 years, 3 months ago (2012-08-28 18:11:44 UTC) #27
satorux1
Sorry for the belated response. Thank you for creating new mock files, and moving test ...
8 years, 3 months ago (2012-08-30 04:38:15 UTC) #28
yoshiki
PTAL http://codereview.chromium.org/10832241/diff/43018/chrome/browser/chromeos/gdata/drive_file_system_unittest.cc File chrome/browser/chromeos/gdata/drive_file_system_unittest.cc (right): http://codereview.chromium.org/10832241/diff/43018/chrome/browser/chromeos/gdata/drive_file_system_unittest.cc#newcode255 chrome/browser/chromeos/gdata/drive_file_system_unittest.cc:255: root_feed_changestamp_++); On 2012/08/30 04:38:15, satorux1 wrote: > looks ...
8 years, 3 months ago (2012-08-30 15:23:45 UTC) #29
satorux1
LGTM
8 years, 3 months ago (2012-08-30 15:45:47 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yoshiki@chromium.org/10832241/56003
8 years, 3 months ago (2012-08-31 05:59:32 UTC) #31
commit-bot: I haz the power
Failed to apply patch for chrome/chrome_browser.gypi: While running patch -p1 --forward --force; patching file chrome/chrome_browser.gypi ...
8 years, 3 months ago (2012-08-31 05:59:34 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yoshiki@chromium.org/10832241/58003
8 years, 3 months ago (2012-08-31 11:32:03 UTC) #33
commit-bot: I haz the power
Change committed as 154430
8 years, 3 months ago (2012-08-31 14:43:05 UTC) #34
achuithb
8 years, 3 months ago (2012-09-14 21:59:41 UTC) #35
I think this CL probably introduced this crasher: 
crbug.com/148752

http://codereview.chromium.org/10832241/diff/58003/chrome/browser/chromeos/gd...
File chrome/browser/chromeos/gdata/stale_cache_files_remover.cc (right):

http://codereview.chromium.org/10832241/diff/58003/chrome/browser/chromeos/gd...
chrome/browser/chromeos/gdata/stale_cache_files_remover.cc:49:
cache_->GetResourceIdsOfAllFilesOnUIThread(
I think this line has a problem..

Powered by Google App Engine
This is Rietveld 408576698