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

Issue 2186433004: [CacheStorage] Deleting a cache could delete the wrong directory (Closed)

Created:
4 years, 4 months ago by jkarlin
Modified:
4 years, 4 months ago
Reviewers:
jsbell
CC:
chromium-reviews, darin-cc_chromium.org, jam, jkarlin+watch_chromium.org, nhiroki
Base URL:
https://chromium.googlesource.com/chromium/src.git@fix1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[CacheStorage] Deleting a cache could delete the wrong directory The CacheStorageCache::CacheLoader maps cache names to paths. The problem is that as of recent changes, it's possible to have two caches with the same name exist simultaneously (the doomed one and a new one). If you then delete the doomed one from disk, the CacheLoader will delete the new one's directory instead since it maps name to path. This CL fixes the above problem by keeping track of doomed caches and their paths separately from live caches. BUG=630036 Committed: https://crrev.com/7680d8569c891a84c9eff3aa21d06c3584339965 Cr-Commit-Position: refs/heads/master@{#407920}

Patch Set 1 #

Patch Set 2 : Nit #

Total comments: 4

Patch Set 3 : formatting #

Patch Set 4 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -19 lines) Patch
M content/browser/cache_storage/cache_storage.cc View 1 2 9 chunks +33 lines, -17 lines 0 comments Download
M content/browser/cache_storage/cache_storage_manager_unittest.cc View 1 3 chunks +26 lines, -2 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 22 (14 generated)
jkarlin
jsbell@ PTAL at everything, thanks!
4 years, 4 months ago (2016-07-26 17:24:40 UTC) #4
jsbell
lgtm https://codereview.chromium.org/2186433004/diff/20001/content/browser/cache_storage/cache_storage.cc File content/browser/cache_storage/cache_storage.cc (right): https://codereview.chromium.org/2186433004/diff/20001/content/browser/cache_storage/cache_storage.cc#newcode130 content/browser/cache_storage/cache_storage.cc:130: std::unique_ptr<CacheStorageCacheHandle> cache_handle){}; nit: space between () and {} ...
4 years, 4 months ago (2016-07-26 17:43:01 UTC) #7
jkarlin
Thanks! https://codereview.chromium.org/2186433004/diff/20001/content/browser/cache_storage/cache_storage.cc File content/browser/cache_storage/cache_storage.cc (right): https://codereview.chromium.org/2186433004/diff/20001/content/browser/cache_storage/cache_storage.cc#newcode130 content/browser/cache_storage/cache_storage.cc:130: std::unique_ptr<CacheStorageCacheHandle> cache_handle){}; On 2016/07/26 17:43:01, jsbell wrote: > ...
4 years, 4 months ago (2016-07-26 17:50:22 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2186433004/40001
4 years, 4 months ago (2016-07-26 17:59:51 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/102206) ios-simulator-gn on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 4 months ago (2016-07-26 18:03:14 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2186433004/60001
4 years, 4 months ago (2016-07-26 20:36:42 UTC) #19
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 4 months ago (2016-07-26 21:26:26 UTC) #20
commit-bot: I haz the power
4 years, 4 months ago (2016-07-26 21:28:06 UTC) #22
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/7680d8569c891a84c9eff3aa21d06c3584339965
Cr-Commit-Position: refs/heads/master@{#407920}

Powered by Google App Engine
This is Rietveld 408576698