| 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_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ |
| 6 #define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ | 6 #define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 // Purge aggressively, i.e. discard cache even for areas that have | 105 // Purge aggressively, i.e. discard cache even for areas that have |
| 106 // non-zero open count. | 106 // non-zero open count. |
| 107 PURGE_AGGRESSIVE, | 107 PURGE_AGGRESSIVE, |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 // |localstorage_directory| and |sessionstorage_directory| may be empty | 110 // |localstorage_directory| and |sessionstorage_directory| may be empty |
| 111 // for incognito browser contexts. | 111 // for incognito browser contexts. |
| 112 DOMStorageContextImpl(const base::FilePath& localstorage_directory, | 112 DOMStorageContextImpl(const base::FilePath& localstorage_directory, |
| 113 const base::FilePath& sessionstorage_directory, | 113 const base::FilePath& sessionstorage_directory, |
| 114 storage::SpecialStoragePolicy* special_storage_policy, | 114 storage::SpecialStoragePolicy* special_storage_policy, |
| 115 DOMStorageTaskRunner* task_runner); | 115 scoped_refptr<DOMStorageTaskRunner> task_runner); |
| 116 | 116 |
| 117 // Returns the directory path for localStorage, or an empty directory, if | 117 // Returns the directory path for localStorage, or an empty directory, if |
| 118 // there is no backing on disk. | 118 // there is no backing on disk. |
| 119 const base::FilePath& localstorage_directory() { | 119 const base::FilePath& localstorage_directory() { |
| 120 return localstorage_directory_; | 120 return localstorage_directory_; |
| 121 } | 121 } |
| 122 | 122 |
| 123 // Returns the directory path for sessionStorage, or an empty directory, if | 123 // Returns the directory path for sessionStorage, or an empty directory, if |
| 124 // there is no backing on disk. | 124 // there is no backing on disk. |
| 125 const base::FilePath& sessionstorage_directory() { | 125 const base::FilePath& sessionstorage_directory() { |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 // sessionStorage. | 268 // sessionStorage. |
| 269 std::map<std::string, int64_t> persistent_namespace_id_to_namespace_id_; | 269 std::map<std::string, int64_t> persistent_namespace_id_to_namespace_id_; |
| 270 | 270 |
| 271 // For cleaning up unused databases more aggressively. | 271 // For cleaning up unused databases more aggressively. |
| 272 bool is_low_end_device_; | 272 bool is_low_end_device_; |
| 273 }; | 273 }; |
| 274 | 274 |
| 275 } // namespace content | 275 } // namespace content |
| 276 | 276 |
| 277 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ | 277 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ |
| OLD | NEW |