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

Issue 7210006: AppCaches which belong to hosted apps are not protected from deletion (Closed)

Created:
9 years, 6 months ago by marja(google)
Modified:
6 years ago
CC:
chromium-reviews, joi+watch-content_chromium.org, jam
Visibility:
Public.

Description

The problem: When the user has the "Clear cookies and other site and plug-in data when I close my browser" setting enabled, all appcache data is deleted when the user closes the browser. The intention is to protect an appcache from deletion, if the user has installed a hosted app which refers to the origin of the appcache. BUG=79604 TEST=ChromeAppCacheService.KeepOnDestruction, ChromeAppCacheService.RemoveOnDestruction Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=93597

Patch Set 1 #

Patch Set 2 : Code sanitizations, rewritten ChromeAppCacheService unit tests. #

Patch Set 3 : Adding a callback to ChromeAppCacheService::ClearAppCache. #

Patch Set 4 : Taking ChromeAppCache::ClearAppCache into use in BrowsingDataRemover. #

Patch Set 5 : Shutdown: waiting until the appcache has been cleared. #

Patch Set 6 : Fixing FIXMEs. #

Patch Set 7 : Waiting in ~ProfileImpl, removing separate function for clearing the appcaches. #

Patch Set 8 : Merging a changelist which simplifies BrowsingDataRemover. #

Patch Set 9 : Fixing the merge. #

Total comments: 24

Patch Set 10 : Small changes (code review comments). #

Patch Set 11 : Small changes cont. #

Total comments: 15

Patch Set 12 : Keeping up to date with trunk. #

Patch Set 13 : Adding tests for the appcache removing functionality of BrowsingDataRemover. #

Patch Set 14 : Keeping up to date with trunk. #

Patch Set 15 : Clearing appcaches & waiting in Shutdown(). #

Total comments: 1

Patch Set 16 : Keeping up to date with trunk. #

Patch Set 17 : Adding a sync code path for the appcache clearing. #

Patch Set 18 : DeleteAppCachesForOrigin was redundant work, enumerating the origins directly. #

Patch Set 19 : Test fix (empty appcache wasn't empty). #

Patch Set 20 : Adding a unit test for ChromeAppCacheService::SyncClearAppCacheOnDBThread(). #

Patch Set 21 : Style fixes + other minor fixes. #

Patch Set 22 : Removing the MockExtensionSpecialStoragePolicy, it's unnecessary now. #

Patch Set 23 : Cleanup (test stuff) and fixing compilation of test_shell_tests. #

Patch Set 24 : Adding unit tests for [parts of] the sync code path. #

Patch Set 25 : Reordering funcs (the order was wrong). #

Patch Set 26 : Cleanup. #

Patch Set 27 : Sync code path: deletion in IO thread, not in DB thread. #

Patch Set 28 : Test beautification. #

Total comments: 15

Patch Set 29 : Redoing the sync code path, starting from ~AppCacheStorageImpl. #

Patch Set 30 : Cancelling an unintentional change. #

Patch Set 31 : Sync code path fix: ~AppCacheStorageImpl accesses SpecialStoragePolicy-> fix lifetime. #

Patch Set 32 : Minor. #

Total comments: 15

Patch Set 33 : Cancelling the appcache clearing code move. Rewrote unit tests obsoleted by this. #

Patch Set 34 : Fixes (code review). #

Patch Set 35 : Cleanup. #

Patch Set 36 : More cleanup. #

Total comments: 13

Patch Set 37 : Modifying tests (code review). #

Patch Set 38 : Test modifications cont. #

Patch Set 39 : Moving test helpers to webkit/appcache. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+349 lines, -215 lines) Patch
M chrome/browser/browsing_data_remover_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 30 31 32 33 34 35 36 37 38 4 chunks +13 lines, -102 lines 0 comments Download
M chrome/browser/extensions/extension_service_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 30 31 32 33 34 35 36 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/profiles/profile.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 30 31 32 33 34 35 36 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/profiles/profile_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 29 30 31 32 33 34 35 36 3 chunks +10 lines, -6 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 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/appcache/chrome_appcache_service.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 29 30 31 32 33 34 35 2 chunks +1 line, -5 lines 0 comments Download
M content/browser/appcache/chrome_appcache_service.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 30 31 32 33 34 3 chunks +2 lines, -38 lines 0 comments Download
M content/browser/appcache/chrome_appcache_service_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 30 31 32 33 34 35 36 37 38 4 chunks +96 lines, -33 lines 0 comments Download
M webkit/appcache/appcache_service.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 29 30 31 32 33 34 2 chunks +5 lines, -0 lines 0 comments Download
M webkit/appcache/appcache_service.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 30 31 32 33 34 2 chunks +5 lines, -1 line 0 comments Download
M webkit/appcache/appcache_storage_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 29 30 31 32 33 34 1 chunk +1 line, -2 lines 0 comments Download
M webkit/appcache/appcache_storage_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 29 30 31 32 33 4 chunks +84 lines, -24 lines 0 comments Download
A webkit/appcache/appcache_test_helper.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 29 30 31 32 33 34 35 36 37 38 1 chunk +49 lines, -0 lines 0 comments Download
A webkit/appcache/appcache_test_helper.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 30 31 32 33 34 35 36 37 38 1 chunk +77 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (0 generated)
michaeln
http://codereview.chromium.org/7210006/diff/14017/chrome/browser/profiles/profile_impl.cc File chrome/browser/profiles/profile_impl.cc (right): http://codereview.chromium.org/7210006/diff/14017/chrome/browser/profiles/profile_impl.cc#newcode596 chrome/browser/profiles/profile_impl.cc:596: event->Wait(); We should not block the UI thread for ...
9 years, 5 months ago (2011-07-02 00:29:09 UTC) #1
michaeln
cc'ing jochen to see what he thinks about the PreventBrowserShutdown thing too
9 years, 5 months ago (2011-07-02 00:32:46 UTC) #2
jochen (gone - plz use gerrit)
http://codereview.chromium.org/7210006/diff/14017/chrome/browser/profiles/profile_impl.cc File chrome/browser/profiles/profile_impl.cc (right): http://codereview.chromium.org/7210006/diff/14017/chrome/browser/profiles/profile_impl.cc#newcode596 chrome/browser/profiles/profile_impl.cc:596: event->Wait(); I agree that we shouldn't wait on the ...
9 years, 5 months ago (2011-07-06 09:41:45 UTC) #3
marja(google)
http://codereview.chromium.org/7210006/diff/14017/chrome/browser/profiles/profile_impl.cc File chrome/browser/profiles/profile_impl.cc (right): http://codereview.chromium.org/7210006/diff/14017/chrome/browser/profiles/profile_impl.cc#newcode596 chrome/browser/profiles/profile_impl.cc:596: event->Wait(); On 2011/07/06 09:41:45, jochen wrote: > I agree ...
9 years, 5 months ago (2011-07-06 11:44:39 UTC) #4
marja(google)
Marking the small changes "done". The bigger change (where & how to wait) is undone. ...
9 years, 5 months ago (2011-07-06 14:34:09 UTC) #5
jochen (gone - plz use gerrit)
On 2011/07/06 11:44:39, marja wrote: > http://codereview.chromium.org/7210006/diff/14017/chrome/browser/profiles/profile_impl.cc > File chrome/browser/profiles/profile_impl.cc (right): > > http://codereview.chromium.org/7210006/diff/14017/chrome/browser/profiles/profile_impl.cc#newcode596 > ...
9 years, 5 months ago (2011-07-07 14:38:05 UTC) #6
michaeln
> I think that's only required if you delete databases during runtime (i.e. the > ...
9 years, 5 months ago (2011-07-07 18:58:41 UTC) #7
michaeln
http://codereview.chromium.org/7210006/diff/29001/content/browser/appcache/chrome_appcache_service_unittest.cc File content/browser/appcache/chrome_appcache_service_unittest.cc (right): http://codereview.chromium.org/7210006/diff/29001/content/browser/appcache/chrome_appcache_service_unittest.cc#newcode20 content/browser/appcache/chrome_appcache_service_unittest.cc:20: const FilePath::CharType kTestingAppCacheDirname[] = is this needed anymore? http://codereview.chromium.org/7210006/diff/29001/content/browser/appcache/chrome_appcache_service_unittest.cc#newcode58 ...
9 years, 5 months ago (2011-07-07 19:06:51 UTC) #8
jochen (gone - plz use gerrit)
On 2011/07/07 18:58:41, michaeln wrote: > > I think that's only required if you delete ...
9 years, 5 months ago (2011-07-07 20:01:50 UTC) #9
marja(google)
Adding the synchronous code path turned out to be a bit hairier (*) than estimated, ...
9 years, 5 months ago (2011-07-12 14:25:26 UTC) #10
michaeln
I haven't taken a look at the new CL yet. > Adding the synchronous code ...
9 years, 5 months ago (2011-07-12 18:28:35 UTC) #11
michaeln
If it really is a requirement to wait for the DiskCache to be scrubbed (i'd ...
9 years, 5 months ago (2011-07-12 18:45:38 UTC) #12
marja(google)
On 2011/07/12 18:28:35, michaeln wrote: > I question whether we actually need to wait for ...
9 years, 5 months ago (2011-07-13 07:17:04 UTC) #13
marja(google)
Some small changes are now done, some have been reverted. http://codereview.chromium.org/7210006/diff/14017/content/browser/appcache/chrome_appcache_service.cc File content/browser/appcache/chrome_appcache_service.cc (right): http://codereview.chromium.org/7210006/diff/14017/content/browser/appcache/chrome_appcache_service.cc#newcode76 ...
9 years, 5 months ago (2011-07-13 11:06:59 UTC) #14
marja(google)
Style fixes done. http://codereview.chromium.org/7210006/diff/29001/content/browser/appcache/chrome_appcache_service_unittest.cc File content/browser/appcache/chrome_appcache_service_unittest.cc (right): http://codereview.chromium.org/7210006/diff/29001/content/browser/appcache/chrome_appcache_service_unittest.cc#newcode20 content/browser/appcache/chrome_appcache_service_unittest.cc:20: const FilePath::CharType kTestingAppCacheDirname[] = On 2011/07/07 ...
9 years, 5 months ago (2011-07-13 11:13:16 UTC) #15
marja(google)
The sync code path is added now. I also hope I've now done all the ...
9 years, 5 months ago (2011-07-13 12:42:22 UTC) #16
michaeln
This CL is a bit different than what i was expecting after this earlier exchange ...
9 years, 5 months ago (2011-07-14 00:42:34 UTC) #17
marja(google)
Second round of sync code path, this time following Michael's idea more closely (I had ...
9 years, 5 months ago (2011-07-14 10:31:58 UTC) #18
michaeln
Yup... getting there... http://codereview.chromium.org/7210006/diff/37023/chrome/browser/browsing_data_remover.cc File chrome/browser/browsing_data_remover.cc (right): http://codereview.chromium.org/7210006/diff/37023/chrome/browser/browsing_data_remover.cc#newcode526 chrome/browser/browsing_data_remover.cc:526: appcache_service_->ClearAppCache(&appcache_cleared_callback_); >> The code in this ...
9 years, 5 months ago (2011-07-14 22:53:16 UTC) #19
marja(google)
Thanks for clarifications, I cancelled the code move (BrowsingDataRemover -> ChromeAppCacheService). ChromeAppCacheService unit tests were ...
9 years, 5 months ago (2011-07-15 11:03:41 UTC) #20
michaeln
http://codereview.chromium.org/7210006/diff/57001/webkit/appcache/appcache_storage_impl.cc File webkit/appcache/appcache_storage_impl.cc (right): http://codereview.chromium.org/7210006/diff/57001/webkit/appcache/appcache_storage_impl.cc#newcode71 webkit/appcache/appcache_storage_impl.cc:71: // Logic lifted from MakeGroupObsoleteTask::Run, could be shared. > ...
9 years, 5 months ago (2011-07-15 19:15:46 UTC) #21
marja(google)
http://codereview.chromium.org/7210006/diff/65001/chrome/test/appcache_util.h File chrome/test/appcache_util.h (right): http://codereview.chromium.org/7210006/diff/65001/chrome/test/appcache_util.h#newcode17 chrome/test/appcache_util.h:17: class AppCacheInserter : public appcache::AppCacheStorage::Delegate { On 2011/07/15 19:15:46, ...
9 years, 5 months ago (2011-07-18 09:55:40 UTC) #22
marja(google)
http://codereview.chromium.org/7210006/diff/65001/content/browser/appcache/chrome_appcache_service_unittest.cc File content/browser/appcache/chrome_appcache_service_unittest.cc (right): http://codereview.chromium.org/7210006/diff/65001/content/browser/appcache/chrome_appcache_service_unittest.cc#newcode62 content/browser/appcache/chrome_appcache_service_unittest.cc:62: scoped_refptr<ChromeAppCacheService>& appcache_service, On 2011/07/18 09:55:41, marja wrote: > On ...
9 years, 5 months ago (2011-07-18 15:03:20 UTC) #23
michaeln
LGTM and thnx for doing this!
9 years, 5 months ago (2011-07-18 18:54:17 UTC) #24
marja(google)
On 2011/07/18 18:54:17, michaeln wrote: > LGTM and thnx for doing this! Thanks for the ...
9 years, 5 months ago (2011-07-20 08:52:21 UTC) #25
commit-bot: I haz the power
Presubmit check for 7210006-70021 failed and returned exit status 1. Running presubmit commit checks ...
9 years, 5 months ago (2011-07-20 08:52:51 UTC) #26
marja(google)
Hi Miranda, As an owner of chrome/browser/profiles/*, could you review the relevant parts of this ...
9 years, 5 months ago (2011-07-20 09:01:50 UTC) #27
marja(google)
Hi Jay, As an owner of chrome/test, could you review that the files added by ...
9 years, 5 months ago (2011-07-20 09:10:11 UTC) #28
Miranda Callahan
On 2011/07/20 09:01:50, marja wrote: > Hi Miranda, > > As an owner of chrome/browser/profiles/*, ...
9 years, 5 months ago (2011-07-20 12:51:12 UTC) #29
michaeln
On 2011/07/20 09:10:11, marja wrote: > Hi Jay, > > As an owner of chrome/test, ...
9 years, 5 months ago (2011-07-20 20:25:12 UTC) #30
marja(google)
On 2011/07/20 20:25:12, michaeln wrote: > Another option could be to move the appcache_test_helper.* files ...
9 years, 5 months ago (2011-07-21 08:57:23 UTC) #31
michaeln
yup... lgtm still :)
9 years, 5 months ago (2011-07-21 18:55:57 UTC) #32
commit-bot: I haz the power
Try job failure for 7210006-79001 (retry) on linux for step "compile" (clobber build). It's a ...
9 years, 5 months ago (2011-07-22 07:56:39 UTC) #33
commit-bot: I haz the power
9 years, 5 months ago (2011-07-22 10:21:09 UTC) #34
Change committed as 93597

Powered by Google App Engine
This is Rietveld 408576698