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

Side by Side Diff: extensions/shell/browser/shell_special_storage_policy.cc

Issue 1229933007: Make quota logic obey durable storage permission (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@3_top_durable
Patch Set: fix extensions_browsertests compile Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/shell/browser/shell_special_storage_policy.h" 5 #include "extensions/shell/browser/shell_special_storage_policy.h"
6 6
7 namespace extensions { 7 namespace extensions {
8 8
9 ShellSpecialStoragePolicy::ShellSpecialStoragePolicy() { 9 ShellSpecialStoragePolicy::ShellSpecialStoragePolicy() {
10 } 10 }
11 11
12 ShellSpecialStoragePolicy::~ShellSpecialStoragePolicy() { 12 ShellSpecialStoragePolicy::~ShellSpecialStoragePolicy() {
13 } 13 }
14 14
15 bool ShellSpecialStoragePolicy::IsStorageProtected(const GURL& origin) { 15 bool ShellSpecialStoragePolicy::IsStorageProtected(const GURL& origin) {
16 return true; 16 return true;
17 } 17 }
18 18
19 bool ShellSpecialStoragePolicy::IsStorageUnlimited(const GURL& origin) { 19 bool ShellSpecialStoragePolicy::IsStorageUnlimited(const GURL& origin) {
20 return true; 20 return true;
21 } 21 }
22 22
23 bool ShellSpecialStoragePolicy::IsStorageDurable(const GURL& origin) {
24 // The plan is to forbid extensions from acquiring the durable storage
25 // permission because they can specify 'unlimitedStorage' in the manifest.
26 return false;
27 }
28
23 bool ShellSpecialStoragePolicy::IsStorageSessionOnly(const GURL& origin) { 29 bool ShellSpecialStoragePolicy::IsStorageSessionOnly(const GURL& origin) {
24 return false; 30 return false;
25 } 31 }
26 32
27 bool ShellSpecialStoragePolicy::CanQueryDiskSize(const GURL& origin) { 33 bool ShellSpecialStoragePolicy::CanQueryDiskSize(const GURL& origin) {
28 return true; 34 return true;
29 } 35 }
30 36
31 bool ShellSpecialStoragePolicy::HasSessionOnlyOrigins() { 37 bool ShellSpecialStoragePolicy::HasSessionOnlyOrigins() {
32 return false; 38 return false;
33 } 39 }
34 40
35 bool ShellSpecialStoragePolicy::HasIsolatedStorage(const GURL& origin) { 41 bool ShellSpecialStoragePolicy::HasIsolatedStorage(const GURL& origin) {
36 return false; 42 return false;
37 } 43 }
38 44
39 } // namespace extensions 45 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/shell/browser/shell_special_storage_policy.h ('k') | storage/browser/quota/quota_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698