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

Issue 6077005: Refactored app cache clear on exit code to happen in the object owning the files. (Closed)

Created:
10 years ago by pastarmovj
Modified:
9 years, 7 months ago
CC:
chromium-reviews, Erik does not do reviews, brettw-cc_chromium.org, jam, Aaron Boodman, pam+watch_chromium.org, Paweł Hajdan Jr., darin-cc_chromium.org, stuartmorgan+watch_chromium.org
Visibility:
Public.

Description

Refactored app cache clear on exit code to happen in the object owning the files. In an effort to remove the static functions that used to be called from the BrowserProcessImpl very late in the shutdown process and move the code to immediately after the files get freed from their respective users. Which will help to parallelize the shutdown sequence better and ensure files are deleted when they are not used anymore. BUG=65076 TEST=TBA Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=70893

Patch Set 1 #

Patch Set 2 : Moved clean up code to ChromeAppCacheService class. #

Total comments: 2

Patch Set 3 : Fixed multithreading and added unit tests. #

Total comments: 4

Patch Set 4 : Avoid race conditions and improper destruction order. #

Total comments: 16

Patch Set 5 : Style fixes. #

Total comments: 10

Patch Set 6 : More style fixes. #

Patch Set 7 : Dates all updated to 2011. #

Total comments: 2

Patch Set 8 : Made the unit tests to really initialize the appcache store. #

Patch Set 9 : Fixed windows test problem and rebased. #

Patch Set 10 : Fixed s/2010/2011/ in appacache_storage_impl.h #

Total comments: 7

Patch Set 11 : Fixed the nits. #

Total comments: 4

Patch Set 12 : Fixed some small restovers from earlier revision of the CL. #

Patch Set 13 : One more unittest change. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+165 lines, -21 lines) Patch
M chrome/browser/appcache/chrome_appcache_service.h View 1 2 3 4 3 chunks +8 lines, -3 lines 0 comments Download
M chrome/browser/appcache/chrome_appcache_service.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +38 lines, -8 lines 0 comments Download
A chrome/browser/appcache/chrome_appcache_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +99 lines, -0 lines 0 comments Download
M chrome/browser/browser_process_impl.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_service_unittest.cc View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile.cc View 1 2 3 4 5 6 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 2 3 4 5 3 chunks +9 lines, -3 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M webkit/appcache/appcache_storage_impl.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -1 line 0 comments Download

Messages

Total messages: 20 (0 generated)
pastarmovj
@* : This the change proposed to move the code deleting the appcache files as ...
10 years ago (2010-12-22 17:23:23 UTC) #1
pastarmovj
Moved the clean up code to ChromeAppCacheService.
9 years, 11 months ago (2011-01-04 13:38:40 UTC) #2
jochen (gone - plz use gerrit)
please add unit tests http://codereview.chromium.org/6077005/diff/3001/chrome/browser/appcache/chrome_appcache_service.cc File chrome/browser/appcache/chrome_appcache_service.cc (right): http://codereview.chromium.org/6077005/diff/3001/chrome/browser/appcache/chrome_appcache_service.cc#newcode51 chrome/browser/appcache/chrome_appcache_service.cc:51: file_util::Delete(cache_path_, true); this should happen ...
9 years, 11 months ago (2011-01-04 14:32:53 UTC) #3
michaeln
> @michaeln : > This CL deals with the AppCacheDatabase object of the AppCacheStore class ...
9 years, 11 months ago (2011-01-04 23:23:14 UTC) #4
michaeln
http://codereview.chromium.org/6077005/diff/10001/chrome/browser/appcache/chrome_appcache_service.cc File chrome/browser/appcache/chrome_appcache_service.cc (right): http://codereview.chromium.org/6077005/diff/10001/chrome/browser/appcache/chrome_appcache_service.cc#newcode53 chrome/browser/appcache/chrome_appcache_service.cc:53: NewRunnableFunction(file_util::Delete, cache_path_, true)); I think if this task was ...
9 years, 11 months ago (2011-01-05 00:59:13 UTC) #5
pastarmovj
Addressed the comments. Linux/Linux_chromeos bots are red because of some problem with the compilation in ...
9 years, 11 months ago (2011-01-05 10:47:06 UTC) #6
jochen (gone - plz use gerrit)
http://codereview.chromium.org/6077005/diff/16001/chrome/browser/appcache/chrome_appcache_service.h File chrome/browser/appcache/chrome_appcache_service.h (right): http://codereview.chromium.org/6077005/diff/16001/chrome/browser/appcache/chrome_appcache_service.h#newcode1 chrome/browser/appcache/chrome_appcache_service.h:1: // Copyright (c) 2010 The Chromium Authors. All rights ...
9 years, 11 months ago (2011-01-05 10:55:44 UTC) #7
pastarmovj
Fixed the style issues and advices. http://codereview.chromium.org/6077005/diff/16001/chrome/browser/appcache/chrome_appcache_service.h File chrome/browser/appcache/chrome_appcache_service.h (right): http://codereview.chromium.org/6077005/diff/16001/chrome/browser/appcache/chrome_appcache_service.h#newcode1 chrome/browser/appcache/chrome_appcache_service.h:1: // Copyright (c) ...
9 years, 11 months ago (2011-01-05 12:15:13 UTC) #8
jochen (gone - plz use gerrit)
http://codereview.chromium.org/6077005/diff/22001/chrome/browser/appcache/chrome_appcache_service.cc File chrome/browser/appcache/chrome_appcache_service.cc (right): http://codereview.chromium.org/6077005/diff/22001/chrome/browser/appcache/chrome_appcache_service.cc#newcode64 chrome/browser/appcache/chrome_appcache_service.cc:64: if (clear_local_state_on_exit_ && !cache_path_.empty()) use { ... }. also, ...
9 years, 11 months ago (2011-01-05 12:29:51 UTC) #9
pastarmovj
Fixed nits. http://codereview.chromium.org/6077005/diff/22001/chrome/browser/appcache/chrome_appcache_service.cc File chrome/browser/appcache/chrome_appcache_service.cc (right): http://codereview.chromium.org/6077005/diff/22001/chrome/browser/appcache/chrome_appcache_service.cc#newcode64 chrome/browser/appcache/chrome_appcache_service.cc:64: if (clear_local_state_on_exit_ && !cache_path_.empty()) On 2011/01/05 12:29:51, ...
9 years, 11 months ago (2011-01-05 13:47:37 UTC) #10
pastarmovj
Fixed the last file with date 2010 in the copyright comment. I thought it is ...
9 years, 11 months ago (2011-01-05 14:10:36 UTC) #11
michaeln
http://codereview.chromium.org/6077005/diff/34001/chrome/browser/appcache/chrome_appcache_service_unittest.cc File chrome/browser/appcache/chrome_appcache_service_unittest.cc (right): http://codereview.chromium.org/6077005/diff/34001/chrome/browser/appcache/chrome_appcache_service_unittest.cc#newcode58 chrome/browser/appcache/chrome_appcache_service_unittest.cc:58: TEST_F(ChromeAppCacheServiceTest, RemoveOnDestruction) { The ChromeAppCacheService code looks great, I ...
9 years, 11 months ago (2011-01-05 21:03:05 UTC) #12
pastarmovj
Fixed the tests to create and use real store instead of creating a fake one. ...
9 years, 11 months ago (2011-01-07 13:28:21 UTC) #13
pastarmovj
Just uploaded one more revision but the only change there is s/2010/2011/ in appcache_store_impl.h. None ...
9 years, 11 months ago (2011-01-07 13:48:31 UTC) #14
jochen (gone - plz use gerrit)
http://codereview.chromium.org/6077005/diff/44001/chrome/browser/appcache/chrome_appcache_service.cc File chrome/browser/appcache/chrome_appcache_service.cc (right): http://codereview.chromium.org/6077005/diff/44001/chrome/browser/appcache/chrome_appcache_service.cc#newcode27 chrome/browser/appcache/chrome_appcache_service.cc:27: &file_util::Delete, cache_path, true)); hum, you include a reference to ...
9 years, 11 months ago (2011-01-07 14:58:00 UTC) #15
pastarmovj
Fixed the nits and answered the question about file_util::Delete. http://codereview.chromium.org/6077005/diff/44001/chrome/browser/appcache/chrome_appcache_service.cc File chrome/browser/appcache/chrome_appcache_service.cc (right): http://codereview.chromium.org/6077005/diff/44001/chrome/browser/appcache/chrome_appcache_service.cc#newcode27 chrome/browser/appcache/chrome_appcache_service.cc:27: ...
9 years, 11 months ago (2011-01-07 15:15:35 UTC) #16
michaeln
LGTM, thanx for working on the test http://codereview.chromium.org/6077005/diff/44001/chrome/browser/appcache/chrome_appcache_service.cc File chrome/browser/appcache/chrome_appcache_service.cc (right): http://codereview.chromium.org/6077005/diff/44001/chrome/browser/appcache/chrome_appcache_service.cc#newcode27 chrome/browser/appcache/chrome_appcache_service.cc:27: &file_util::Delete, cache_path, ...
9 years, 11 months ago (2011-01-07 19:53:04 UTC) #17
michaeln
http://codereview.chromium.org/6077005/diff/49002/webkit/appcache/appcache_storage_impl.h File webkit/appcache/appcache_storage_impl.h (right): http://codereview.chromium.org/6077005/diff/49002/webkit/appcache/appcache_storage_impl.h#newcode55 webkit/appcache/appcache_storage_impl.h:55: protected: oh wait... why have these new protected data ...
9 years, 11 months ago (2011-01-07 19:56:52 UTC) #18
pastarmovj
Fixed comments. All non expected file changes are results of rebasing the code on top ...
9 years, 11 months ago (2011-01-10 11:02:01 UTC) #19
michaeln
9 years, 11 months ago (2011-01-10 20:34:03 UTC) #20
Thnx... LGTM!

Powered by Google App Engine
This is Rietveld 408576698