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

Side by Side Diff: storage/browser/quota/special_storage_policy.h

Issue 1782053004: Change how the quota system computes the total poolsize for temporary storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 3 years, 10 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 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 quota or storage pressure eviction. 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. 51 // Durable storage is not subject to storage pressure eviction.
52 virtual bool IsStorageDurable(const GURL& origin) = 0; 52 virtual bool IsStorageDurable(const GURL& origin) = 0;
53 53
54 // Some origins (e.g. installed apps) have access to the size of the remaining
55 // disk capacity.
56 virtual bool CanQueryDiskSize(const GURL& origin) = 0;
57
58 // Checks if the origin contains per-site isolated storage. 54 // Checks if the origin contains per-site isolated storage.
59 virtual bool HasIsolatedStorage(const GURL& origin) = 0; 55 virtual bool HasIsolatedStorage(const GURL& origin) = 0;
60 56
61 // Some origins are only allowed to store session-only data which is deleted 57 // Some origins are only allowed to store session-only data which is deleted
62 // when the session ends. 58 // when the session ends.
63 virtual bool IsStorageSessionOnly(const GURL& origin) = 0; 59 virtual bool IsStorageSessionOnly(const GURL& origin) = 0;
64 60
65 // Returns true if some origins are only allowed session-only storage. 61 // Returns true if some origins are only allowed session-only storage.
66 virtual bool HasSessionOnlyOrigins() = 0; 62 virtual bool HasSessionOnlyOrigins() = 0;
67 63
68 // Adds/removes an observer, the policy does not take 64 // Adds/removes an observer, the policy does not take
69 // ownership of the observer. Should only be called on the IO thread. 65 // ownership of the observer. Should only be called on the IO thread.
70 void AddObserver(Observer* observer); 66 void AddObserver(Observer* observer);
71 void RemoveObserver(Observer* observer); 67 void RemoveObserver(Observer* observer);
72 68
73 protected: 69 protected:
74 friend class base::RefCountedThreadSafe<SpecialStoragePolicy>; 70 friend class base::RefCountedThreadSafe<SpecialStoragePolicy>;
75 virtual ~SpecialStoragePolicy(); 71 virtual ~SpecialStoragePolicy();
76 void NotifyGranted(const GURL& origin, int change_flags); 72 void NotifyGranted(const GURL& origin, int change_flags);
77 void NotifyRevoked(const GURL& origin, int change_flags); 73 void NotifyRevoked(const GURL& origin, int change_flags);
78 void NotifyCleared(); 74 void NotifyCleared();
79 75
80 base::ObserverList<Observer> observers_; 76 base::ObserverList<Observer> observers_;
81 }; 77 };
82 78
83 } // namespace storage 79 } // namespace storage
84 80
85 #endif // STORAGE_BROWSER_QUOTA_SPECIAL_STORAGE_POLICY_H_ 81 #endif // STORAGE_BROWSER_QUOTA_SPECIAL_STORAGE_POLICY_H_
OLDNEW
« no previous file with comments | « storage/browser/quota/quota_temporary_storage_evictor.cc ('k') | storage/browser/quota/usage_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698