diff options
author | dgrogan <dgrogan@chromium.org> | 2015-07-21 16:43:09 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-21 23:44:44 +0000 |
commit | 5f7b6c265895c0021af511ce73a1241b407395dd (patch) | |
tree | dc64c061ab479410e1a63cf686e74c2e4a1b69c9 /extensions/shell/browser | |
parent | c71cc2ecf056ccb59249ba156d927f087bcae28b (diff) | |
download | chromium_src-5f7b6c265895c0021af511ce73a1241b407395dd.zip chromium_src-5f7b6c265895c0021af511ce73a1241b407395dd.tar.gz chromium_src-5f7b6c265895c0021af511ce73a1241b407395dd.tar.bz2 |
Make quota logic obey durable storage permission
When the quota database is asked for the least recently used origin for
eviction it should not return any origins that have been granted the
durable storage permission.
Note that there is no easy way for a user to set this permission yet.
That is coming in https://codereview.chromium.org/1164073005/ and
https://codereview.chromium.org/1154573005/
BUG=482814
Review URL: https://codereview.chromium.org/1229933007
Cr-Commit-Position: refs/heads/master@{#339783}
Diffstat (limited to 'extensions/shell/browser')
-rw-r--r-- | extensions/shell/browser/shell_special_storage_policy.cc | 6 | ||||
-rw-r--r-- | extensions/shell/browser/shell_special_storage_policy.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/extensions/shell/browser/shell_special_storage_policy.cc b/extensions/shell/browser/shell_special_storage_policy.cc index 5ed1b50..d43c71b 100644 --- a/extensions/shell/browser/shell_special_storage_policy.cc +++ b/extensions/shell/browser/shell_special_storage_policy.cc @@ -20,6 +20,12 @@ bool ShellSpecialStoragePolicy::IsStorageUnlimited(const GURL& origin) { return true; } +bool ShellSpecialStoragePolicy::IsStorageDurable(const GURL& origin) { + // The plan is to forbid extensions from acquiring the durable storage + // permission because they can specify 'unlimitedStorage' in the manifest. + return false; +} + bool ShellSpecialStoragePolicy::IsStorageSessionOnly(const GURL& origin) { return false; } diff --git a/extensions/shell/browser/shell_special_storage_policy.h b/extensions/shell/browser/shell_special_storage_policy.h index e59602f..dc78154 100644 --- a/extensions/shell/browser/shell_special_storage_policy.h +++ b/extensions/shell/browser/shell_special_storage_policy.h @@ -18,6 +18,7 @@ class ShellSpecialStoragePolicy : public storage::SpecialStoragePolicy { // storage::SpecialStoragePolicy implementation. bool IsStorageProtected(const GURL& origin) override; bool IsStorageUnlimited(const GURL& origin) override; + bool IsStorageDurable(const GURL& origin) override; bool IsStorageSessionOnly(const GURL& origin) override; bool CanQueryDiskSize(const GURL& origin) override; bool HasIsolatedStorage(const GURL& origin) override; |