New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 642955 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Count Local Storage towards quota

Project Member Reported by jrumm...@chromium.org, Aug 31 2016

Issue description

Version: 55.0.2845.0 (canary)
OS: Windows, Linux (I assume all)

What steps will reproduce the problem?
(1) Open the "Cookies and site data" dialog (chrome://settings/cookies, or MD equivalent)
(2) Find an entry that uses Local storage
(3) Compare the size reported for the site with the sizes of each item.

I happened to use www.netflix.com, where it is obvious. The reported total is 34.9 KB, but the individual sizes are:
Indexed Database: 34.9 KB
Local Storage:    14.0 KB. (See attached image)

Similar for www.google.com. Total is 1,119 KB, but the individual sizes are:
Cache storage:     1111 KB
Indexed database:   4.8 KB
Local Storage:      3.0 KB
Service Workers:    3.6 KB
Total            1122.4 KB

For a site with just Local storage (in my case www.youtube.com), no total size is displayed.

What is the expected output?
I would expect the total to be 48.9 KB for www.netflix.com, 1122 KB for www.google.com.

What do you see instead?
It appears that the Local storage size is not included in the total.
 
Storage.jpg
48.4 KB View Download

Comment 1 by finnur@chromium.org, Sep 28 2016

Cc: michaeln@chromium.org cmumford@chromium.org dmu...@chromium.org
Components: Blink>Storage>DOMStorage Blink>Storage
CC-ing a few knowledgable people who work on storage, or, I believe, have worked on storage at some point in the past. If there is a more appropriate person feel free to cc.

This issue here is that LocalStorage is not counted against the usage total. I dug into this a bit and this is what I found: Both the new UI (md-settings) and the old UI (cookie data view under Content settings) uses QuotaManager::GetUsageTracker to gather the total number, which comes up a little short because it leaves out LocalStorage.

Below the hood, a bunch of QuotaClients that have called QuotamanagerProxy::RegisterClient get queried, among them AppCache, CacheStorage, IndexedDB, ServiceWorker, Database and FileSystem. LocalStorage, however, is not a QuotaClient. SessionStorage is also not a QuotaClient, so presumably we'd have the same problem there.

Should they/can they even be QuotaClients? I don't know. 

But it would be good to get input from someone as to what the expectation here is. 

Comment 2 by jsb...@chromium.org, Sep 28 2016

Components: -Blink>Storage Blink>Storage>Quota
Status: Available (was: Untriaged)
We've talked about counting DOM Storage under quota for ages... I'm surprised we don't have a bug on it already, but not finding one. :P

It'd be a behavior change - right now each origin gets 10MB of DOM Storage (see  issue 225934 ) regardless of quota limits. Not only doesn't it count against quota but (IIRC) we don't flush it when we evict an origin (not 100% sure though) - michaeln@?

Comment 3 by finnur@chromium.org, Sep 30 2016

Summary: Count Local Storage towards quota (was: Cookies and site data dialog doesn't use Local Storage size in total space calculation)
That seems to match my experience with it. Calling StorageInfoFetcher::ClearStorage and
BrowsingDataLocalStorageHelper::DeleteOrigin still leaves some LocalStorage behind.

Renaming the bug to reflect what is needed.
Components: Privacy
Currently, we treat local/session storage as completely outside of quota system, similar to how cookies/cache and various other smaller/transient stores are not counted.

> we don't flush it when we evict an origin
Yes, i beleive this is true today.
Project Member

Comment 6 by sheriffbot@chromium.org, Oct 6 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Recharge-Cold
Status: Available (was: Untriaged)
*snooze*
Project Member

Comment 8 by sheriffbot@chromium.org, Oct 8

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Recharge-Cold
Status: Available (was: Untriaged)

Sign in to add a comment