OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef STORAGE_BROWSER_QUOTA_SPECIAL_STORAGE_POLICY_H_ | 5 #ifndef STORAGE_BROWSER_QUOTA_SPECIAL_STORAGE_POLICY_H_ |
6 #define STORAGE_BROWSER_QUOTA_SPECIAL_STORAGE_POLICY_H_ | 6 #define STORAGE_BROWSER_QUOTA_SPECIAL_STORAGE_POLICY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 protected: | 39 protected: |
40 virtual ~Observer(); | 40 virtual ~Observer(); |
41 }; | 41 }; |
42 | 42 |
43 SpecialStoragePolicy(); | 43 SpecialStoragePolicy(); |
44 | 44 |
45 // Protected storage is not subject to removal by the browsing data remover. | 45 // Protected storage is not subject to removal by the browsing data remover. |
46 virtual bool IsStorageProtected(const GURL& origin) = 0; | 46 virtual bool IsStorageProtected(const GURL& origin) = 0; |
47 | 47 |
48 // Unlimited storage is not subject to 'quotas'. | 48 // Unlimited storage is not subject to quota or storage pressure eviction. |
49 virtual bool IsStorageUnlimited(const GURL& origin) = 0; | 49 virtual bool IsStorageUnlimited(const GURL& origin) = 0; |
50 | 50 |
| 51 // Durable storage is not subject to storage pressure eviction. |
| 52 virtual bool IsStorageDurable(const GURL& origin) = 0; |
| 53 |
51 // Some origins (e.g. installed apps) have access to the size of the remaining | 54 // Some origins (e.g. installed apps) have access to the size of the remaining |
52 // disk capacity. | 55 // disk capacity. |
53 virtual bool CanQueryDiskSize(const GURL& origin) = 0; | 56 virtual bool CanQueryDiskSize(const GURL& origin) = 0; |
54 | 57 |
55 // Checks if the origin contains per-site isolated storage. | 58 // Checks if the origin contains per-site isolated storage. |
56 virtual bool HasIsolatedStorage(const GURL& origin) = 0; | 59 virtual bool HasIsolatedStorage(const GURL& origin) = 0; |
57 | 60 |
58 // Some origins are only allowed to store session-only data which is deleted | 61 // Some origins are only allowed to store session-only data which is deleted |
59 // when the session ends. | 62 // when the session ends. |
60 virtual bool IsStorageSessionOnly(const GURL& origin) = 0; | 63 virtual bool IsStorageSessionOnly(const GURL& origin) = 0; |
(...skipping 12 matching lines...) Expand all Loading... |
73 void NotifyGranted(const GURL& origin, int change_flags); | 76 void NotifyGranted(const GURL& origin, int change_flags); |
74 void NotifyRevoked(const GURL& origin, int change_flags); | 77 void NotifyRevoked(const GURL& origin, int change_flags); |
75 void NotifyCleared(); | 78 void NotifyCleared(); |
76 | 79 |
77 base::ObserverList<Observer> observers_; | 80 base::ObserverList<Observer> observers_; |
78 }; | 81 }; |
79 | 82 |
80 } // namespace storage | 83 } // namespace storage |
81 | 84 |
82 #endif // STORAGE_BROWSER_QUOTA_SPECIAL_STORAGE_POLICY_H_ | 85 #endif // STORAGE_BROWSER_QUOTA_SPECIAL_STORAGE_POLICY_H_ |
OLD | NEW |