OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_DOM_STORAGE_CONTEXT_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_DOM_STORAGE_CONTEXT_H_ |
6 #define CONTENT_PUBLIC_BROWSER_DOM_STORAGE_CONTEXT_H_ | 6 #define CONTENT_PUBLIC_BROWSER_DOM_STORAGE_CONTEXT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... | |
33 // Returns a collection of origins using local storage to the given callback. | 33 // Returns a collection of origins using local storage to the given callback. |
34 virtual void GetLocalStorageUsage( | 34 virtual void GetLocalStorageUsage( |
35 const GetLocalStorageUsageCallback& callback) = 0; | 35 const GetLocalStorageUsageCallback& callback) = 0; |
36 | 36 |
37 // Returns a collection of origins using session storage to the given | 37 // Returns a collection of origins using session storage to the given |
38 // callback. | 38 // callback. |
39 virtual void GetSessionStorageUsage( | 39 virtual void GetSessionStorageUsage( |
40 const GetSessionStorageUsageCallback& callback) = 0; | 40 const GetSessionStorageUsageCallback& callback) = 0; |
41 | 41 |
42 // Deletes the local storage data for the given origin. | 42 // Deletes the local storage data for the given origin. |
43 // | |
44 // |origin| must not be a suborigin. For the given origin, it will delete | |
45 // all localStorage associated with suborigins at the physical origin of | |
46 // |origin|. (that is, deletion of http://example.com will also delete | |
47 // http-so://foo.example.com). See | |
48 // https://w3c.github.io/webappsec-suborigins/. | |
49 virtual void DeleteLocalStorageForPhysicalOrigin(const GURL& origin) = 0; | |
50 | |
51 // Same as above, but extracts the physical origin from |origin| to do the | |
52 // deletion, so it is unnecessary to guarantee that |origin| doesn't have a | |
53 // suborigin. | |
43 virtual void DeleteLocalStorage(const GURL& origin) = 0; | 54 virtual void DeleteLocalStorage(const GURL& origin) = 0; |
michaeln
2016/10/21 23:07:12
Looking at this again i think we should retain the
jww
2016/10/22 00:43:12
Done.
| |
44 | 55 |
45 // Deletes the session storage data identified by |usage_info|. | 56 // Deletes the session storage data identified by |usage_info|. |
46 virtual void DeleteSessionStorage( | 57 virtual void DeleteSessionStorage( |
47 const SessionStorageUsageInfo& usage_info) = 0; | 58 const SessionStorageUsageInfo& usage_info) = 0; |
48 | 59 |
49 // If this is called, sessionStorage data will be stored on disk, and can be | 60 // If this is called, sessionStorage data will be stored on disk, and can be |
50 // restored after a browser restart (with RecreateSessionStorage). This | 61 // restored after a browser restart (with RecreateSessionStorage). This |
51 // function must be called right after DOMStorageContextWrapper is created, | 62 // function must be called right after DOMStorageContextWrapper is created, |
52 // and before it's used. | 63 // and before it's used. |
53 virtual void SetSaveSessionStorageOnDisk() = 0; | 64 virtual void SetSaveSessionStorageOnDisk() = 0; |
(...skipping 10 matching lines...) Expand all Loading... | |
64 // been created after a session restore, or a session restore won't happen. | 75 // been created after a session restore, or a session restore won't happen. |
65 virtual void StartScavengingUnusedSessionStorage() = 0; | 76 virtual void StartScavengingUnusedSessionStorage() = 0; |
66 | 77 |
67 protected: | 78 protected: |
68 virtual ~DOMStorageContext() {} | 79 virtual ~DOMStorageContext() {} |
69 }; | 80 }; |
70 | 81 |
71 } // namespace content | 82 } // namespace content |
72 | 83 |
73 #endif // CONTENT_PUBLIC_BROWSER_DOM_STORAGE_CONTEXT_H_ | 84 #endif // CONTENT_PUBLIC_BROWSER_DOM_STORAGE_CONTEXT_H_ |
OLD | NEW |