OLD | NEW |
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 CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_ | 5 #ifndef CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_ |
6 #define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_ | 6 #define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 void DeleteSessionStorageOrigin(const GURL& origin); | 78 void DeleteSessionStorageOrigin(const GURL& origin); |
79 void PurgeMemory(PurgeOption purge); | 79 void PurgeMemory(PurgeOption purge); |
80 void Shutdown(); | 80 void Shutdown(); |
81 void Flush(); | 81 void Flush(); |
82 | 82 |
83 unsigned int CountInMemoryAreas() const; | 83 unsigned int CountInMemoryAreas() const; |
84 | 84 |
85 // Adds memory statistics to |pmd| for chrome://tracing. | 85 // Adds memory statistics to |pmd| for chrome://tracing. |
86 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd); | 86 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd); |
87 | 87 |
| 88 void GetOriginsWithAreas(std::vector<GURL>* origins) const; |
| 89 |
88 private: | 90 private: |
89 friend class base::RefCountedThreadSafe<DOMStorageNamespace>; | 91 friend class base::RefCountedThreadSafe<DOMStorageNamespace>; |
90 | 92 |
91 // Struct to hold references to our contained areas and | 93 // Struct to hold references to our contained areas and |
92 // to keep track of how many tabs have a given area open. | 94 // to keep track of how many tabs have a given area open. |
93 struct AreaHolder { | 95 struct AreaHolder { |
94 scoped_refptr<DOMStorageArea> area_; | 96 scoped_refptr<DOMStorageArea> area_; |
95 int open_count_; | 97 int open_count_; |
96 AreaHolder(); | 98 AreaHolder(); |
97 AreaHolder(DOMStorageArea* area, int count); | 99 AreaHolder(DOMStorageArea* area, int count); |
(...skipping 12 matching lines...) Expand all Loading... |
110 base::FilePath directory_; | 112 base::FilePath directory_; |
111 AreaMap areas_; | 113 AreaMap areas_; |
112 scoped_refptr<DOMStorageTaskRunner> task_runner_; | 114 scoped_refptr<DOMStorageTaskRunner> task_runner_; |
113 scoped_refptr<SessionStorageDatabase> session_storage_database_; | 115 scoped_refptr<SessionStorageDatabase> session_storage_database_; |
114 }; | 116 }; |
115 | 117 |
116 } // namespace content | 118 } // namespace content |
117 | 119 |
118 | 120 |
119 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_ | 121 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_ |
OLD | NEW |