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

Side by Side Diff: content/browser/dom_storage/dom_storage_namespace.h

Issue 1900793003: Allow to clear session and local storage when not backed on disk (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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 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
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
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_
OLDNEW
« no previous file with comments | « content/browser/dom_storage/dom_storage_context_impl.cc ('k') | content/browser/dom_storage/dom_storage_namespace.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698