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

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

Issue 1164073005: Allow script to request durable storage permission (chrome side) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased onto content setting patch 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 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // Checks if the origin contains per-site isolated storage. 55 // Checks if the origin contains per-site isolated storage.
56 virtual bool HasIsolatedStorage(const GURL& origin) = 0; 56 virtual bool HasIsolatedStorage(const GURL& origin) = 0;
57 57
58 // Some origins are only allowed to store session-only data which is deleted 58 // Some origins are only allowed to store session-only data which is deleted
59 // when the session ends. 59 // when the session ends.
60 virtual bool IsStorageSessionOnly(const GURL& origin) = 0; 60 virtual bool IsStorageSessionOnly(const GURL& origin) = 0;
61 61
62 // Returns true if some origins are only allowed session-only storage. 62 // Returns true if some origins are only allowed session-only storage.
63 virtual bool HasSessionOnlyOrigins() = 0; 63 virtual bool HasSessionOnlyOrigins() = 0;
64 64
65 virtual bool IsStorageDurable(const GURL& origin) = 0;
66
65 // Adds/removes an observer, the policy does not take 67 // Adds/removes an observer, the policy does not take
66 // ownership of the observer. Should only be called on the IO thread. 68 // ownership of the observer. Should only be called on the IO thread.
67 void AddObserver(Observer* observer); 69 void AddObserver(Observer* observer);
68 void RemoveObserver(Observer* observer); 70 void RemoveObserver(Observer* observer);
69 71
70 protected: 72 protected:
71 friend class base::RefCountedThreadSafe<SpecialStoragePolicy>; 73 friend class base::RefCountedThreadSafe<SpecialStoragePolicy>;
72 virtual ~SpecialStoragePolicy(); 74 virtual ~SpecialStoragePolicy();
73 void NotifyGranted(const GURL& origin, int change_flags); 75 void NotifyGranted(const GURL& origin, int change_flags);
74 void NotifyRevoked(const GURL& origin, int change_flags); 76 void NotifyRevoked(const GURL& origin, int change_flags);
75 void NotifyCleared(); 77 void NotifyCleared();
76 78
77 base::ObserverList<Observer> observers_; 79 base::ObserverList<Observer> observers_;
78 }; 80 };
79 81
80 } // namespace storage 82 } // namespace storage
81 83
82 #endif // STORAGE_BROWSER_QUOTA_SPECIAL_STORAGE_POLICY_H_ 84 #endif // STORAGE_BROWSER_QUOTA_SPECIAL_STORAGE_POLICY_H_
OLDNEW
« content/renderer/durable_dispatcher.cc ('K') | « storage/browser/quota/quota_database.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698