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 WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_ | 5 #ifndef WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_ |
6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_ | 6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // Returns the directory path for localStorage, or an empty directory, if | 94 // Returns the directory path for localStorage, or an empty directory, if |
95 // there is no backing on disk. | 95 // there is no backing on disk. |
96 const base::FilePath& localstorage_directory() { return localstorage_directory
_; } | 96 const base::FilePath& localstorage_directory() { return localstorage_directory
_; } |
97 | 97 |
98 // Returns the directory path for sessionStorage, or an empty directory, if | 98 // Returns the directory path for sessionStorage, or an empty directory, if |
99 // there is no backing on disk. | 99 // there is no backing on disk. |
100 const base::FilePath& sessionstorage_directory() { | 100 const base::FilePath& sessionstorage_directory() { |
101 return sessionstorage_directory_; | 101 return sessionstorage_directory_; |
102 } | 102 } |
103 | 103 |
104 DomStorageTaskRunner* task_runner() const { return task_runner_; } | 104 DomStorageTaskRunner* task_runner() const { return task_runner_.get(); } |
105 DomStorageNamespace* GetStorageNamespace(int64 namespace_id); | 105 DomStorageNamespace* GetStorageNamespace(int64 namespace_id); |
106 | 106 |
107 void GetLocalStorageUsage(std::vector<LocalStorageUsageInfo>* infos, | 107 void GetLocalStorageUsage(std::vector<LocalStorageUsageInfo>* infos, |
108 bool include_file_info); | 108 bool include_file_info); |
109 void GetSessionStorageUsage(std::vector<SessionStorageUsageInfo>* infos); | 109 void GetSessionStorageUsage(std::vector<SessionStorageUsageInfo>* infos); |
110 void DeleteLocalStorage(const GURL& origin); | 110 void DeleteLocalStorage(const GURL& origin); |
111 void DeleteSessionStorage(const SessionStorageUsageInfo& usage_info); | 111 void DeleteSessionStorage(const SessionStorageUsageInfo& usage_info); |
112 void PurgeMemory(); | 112 void PurgeMemory(); |
113 | 113 |
114 // Used by content settings to alter the behavior around | 114 // Used by content settings to alter the behavior around |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 std::set<std::string> protected_persistent_session_ids_; | 221 std::set<std::string> protected_persistent_session_ids_; |
222 | 222 |
223 // Mapping between persistent namespace IDs and namespace IDs for | 223 // Mapping between persistent namespace IDs and namespace IDs for |
224 // sessionStorage. | 224 // sessionStorage. |
225 std::map<std::string, int64> persistent_namespace_id_to_namespace_id_; | 225 std::map<std::string, int64> persistent_namespace_id_to_namespace_id_; |
226 }; | 226 }; |
227 | 227 |
228 } // namespace dom_storage | 228 } // namespace dom_storage |
229 | 229 |
230 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_ | 230 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_ |
OLD | NEW |