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

Issue 651983002: [ServiceWorkerCache] Implement storage::QuotaClient (Closed)

Created:
6 years, 2 months ago by jkarlin
Modified:
6 years, 2 months ago
Reviewers:
michaeln, falken
CC:
chromium-reviews, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, kinuko+serviceworker, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

[ServiceWorkerCache] Implement storage::QuotaClient Adds a QuotaClient for the ServiceWorkerCache system. * Calls to the QuotaManagerProxy like (NotifyStorageAccessed/StorageModified/OriginInUse/etc..) will be in an upcoming CL. * The ServiceWorkerCacheQuotaClient is registered by the ServiceWorkerCacheStorageManager. The QuotaClient holds a WeakPtr to the ServiceWorkerCacheStorageManager since the manager is destroyed before the QuotaClient. * Added a number of unittests. They fit better into the StorageManager tests file than in their own file as they rely on a lot of the StorageManager infrastructure. * In order to support QuotaClient the ServiceWorkerCacheStorageManager needs to be able to list the origins it supports. This data is not currently stored so an "origin" member has been added to the CacheStorage index protobuf. We won't report the origins of existing caches (if any even exist at this point) until their index is next written. BUG=420159 Committed: https://crrev.com/22fcbd3c898136dfe839de3ca5cb0633c17bb163 Cr-Commit-Position: refs/heads/master@{#300187}

Patch Set 1 #

Patch Set 2 : QuotaClientMask #

Patch Set 3 : Delete the cache backends #

Patch Set 4 : Separated quota client into own file, added unit tests #

Patch Set 5 : Rebase #

Patch Set 6 : static index file name #

Patch Set 7 : Nit #

Total comments: 8

Patch Set 8 : Address comments from PS7 #

Total comments: 4

Patch Set 9 : Rebase #

Patch Set 10 : Add comment for the quota client #

Total comments: 2

Patch Set 11 : ServiceWorkerCacheStorageManager no longer ref counted, use weakptr instead #

Total comments: 2

Patch Set 12 : Address comments from PS 10+11 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+514 lines, -55 lines) Patch
M content/browser/service_worker/service_worker_cache.proto View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A + content/browser/service_worker/service_worker_cache_quota_client.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +22 lines, -17 lines 0 comments Download
A content/browser/service_worker/service_worker_cache_quota_client.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +97 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_cache_storage.h View 1 2 3 4 5 6 7 8 2 chunks +8 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_cache_storage.cc View 1 2 3 4 5 6 7 8 11 chunks +39 lines, -12 lines 0 comments Download
M content/browser/service_worker/service_worker_cache_storage_manager.h View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +29 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_cache_storage_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +151 lines, -12 lines 0 comments Download
M content/browser/service_worker/service_worker_cache_storage_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +162 lines, -10 lines 0 comments Download
M content/browser/service_worker/service_worker_context_core.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M storage/browser/quota/quota_client.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 20 (5 generated)
jkarlin
Thanks!
6 years, 2 months ago (2014-10-15 18:57:58 UTC) #3
falken
Drive by nits https://codereview.chromium.org/651983002/diff/200001/content/browser/service_worker/service_worker_cache_quota_client.cc File content/browser/service_worker/service_worker_cache_quota_client.cc (right): https://codereview.chromium.org/651983002/diff/200001/content/browser/service_worker/service_worker_cache_quota_client.cc#newcode34 content/browser/service_worker/service_worker_cache_quota_client.cc:34: DCHECK_CURRENTLY_ON(BrowserThread::IO); do you have to call ...
6 years, 2 months ago (2014-10-16 04:37:38 UTC) #5
jkarlin
Thanks falken! https://codereview.chromium.org/651983002/diff/200001/content/browser/service_worker/service_worker_cache_quota_client.cc File content/browser/service_worker/service_worker_cache_quota_client.cc (right): https://codereview.chromium.org/651983002/diff/200001/content/browser/service_worker/service_worker_cache_quota_client.cc#newcode34 content/browser/service_worker/service_worker_cache_quota_client.cc:34: DCHECK_CURRENTLY_ON(BrowserThread::IO); On 2014/10/16 04:37:37, falken wrote: > ...
6 years, 2 months ago (2014-10-16 11:28:45 UTC) #6
falken
sorry to toss in an architectural question this late https://codereview.chromium.org/651983002/diff/220001/content/browser/service_worker/service_worker_cache_quota_client.h File content/browser/service_worker/service_worker_cache_quota_client.h (right): https://codereview.chromium.org/651983002/diff/220001/content/browser/service_worker/service_worker_cache_quota_client.h#newcode18 content/browser/service_worker/service_worker_cache_quota_client.h:18: ...
6 years, 2 months ago (2014-10-17 02:27:16 UTC) #7
jkarlin
https://codereview.chromium.org/651983002/diff/220001/content/browser/service_worker/service_worker_cache_quota_client.h File content/browser/service_worker/service_worker_cache_quota_client.h (right): https://codereview.chromium.org/651983002/diff/220001/content/browser/service_worker/service_worker_cache_quota_client.h#newcode18 content/browser/service_worker/service_worker_cache_quota_client.h:18: On 2014/10/17 02:27:15, falken wrote: > Could you add ...
6 years, 2 months ago (2014-10-17 13:58:43 UTC) #8
jkarlin
Thanks falken. https://codereview.chromium.org/651983002/diff/220001/content/browser/service_worker/service_worker_cache_storage_manager.h File content/browser/service_worker/service_worker_cache_storage_manager.h (right): https://codereview.chromium.org/651983002/diff/220001/content/browser/service_worker/service_worker_cache_storage_manager.h#newcode40 content/browser/service_worker/service_worker_cache_storage_manager.h:40: : public base::RefCounted<ServiceWorkerCacheStorageManager> { On 2014/10/17 02:27:15, ...
6 years, 2 months ago (2014-10-17 15:07:08 UTC) #10
falken
lgtm! the ref counted part of the CL description needs updating https://codereview.chromium.org/651983002/diff/260001/content/browser/service_worker/service_worker_cache_quota_client.h File content/browser/service_worker/service_worker_cache_quota_client.h (right): ...
6 years, 2 months ago (2014-10-17 15:52:03 UTC) #11
jkarlin
https://codereview.chromium.org/651983002/diff/260001/content/browser/service_worker/service_worker_cache_quota_client.h File content/browser/service_worker/service_worker_cache_quota_client.h (right): https://codereview.chromium.org/651983002/diff/260001/content/browser/service_worker/service_worker_cache_quota_client.h#newcode20 content/browser/service_worker/service_worker_cache_quota_client.h:20: // ServiceWorkerCacheStorageManager, and therefore one per ServiceWorkerContext. On 2014/10/17 ...
6 years, 2 months ago (2014-10-17 16:14:00 UTC) #12
jkarlin
michaeln: PTAL for owners of storage/ Thanks!
6 years, 2 months ago (2014-10-17 16:23:43 UTC) #13
michaeln
lgtm 2
6 years, 2 months ago (2014-10-17 21:18:17 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/651983002/320001
6 years, 2 months ago (2014-10-17 22:49:17 UTC) #16
commit-bot: I haz the power
Committed patchset #12 (id:320001)
6 years, 2 months ago (2014-10-17 23:38:30 UTC) #17
commit-bot: I haz the power
Patchset 12 (id:??) landed as https://crrev.com/22fcbd3c898136dfe839de3ca5cb0633c17bb163 Cr-Commit-Position: refs/heads/master@{#300187}
6 years, 2 months ago (2014-10-17 23:39:24 UTC) #18
kareng
A revert of this CL (patchset #12 id:320001) has been created in https://codereview.chromium.org/651433005/ by kareng@google.com. ...
6 years, 2 months ago (2014-10-19 05:15:48 UTC) #19
jkarlin
6 years, 2 months ago (2014-10-20 11:58:56 UTC) #20
Message was sent while issue was closed.
On 2014/10/19 05:15:48, kareng wrote:
> A revert of this CL (patchset #12 id:320001) has been created in
> https://codereview.chromium.org/651433005/ by mailto:kareng@google.com.
> 
> The reason for reverting is: bug 424923, top crash in canary..

I believe that this CL was an innocent bystander and have updated the bug.  Will
try to reland today.

Powered by Google App Engine
This is Rietveld 408576698