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

Side by Side Diff: webkit/dom_storage/dom_storage_namespace.h

Issue 9817011: DomStorage data deletion and memory purging. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
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_NAMESPACE_H_ 5 #ifndef WEBKIT_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_
6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_ 6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 29 matching lines...) Expand all
40 // creating instance if needed. Each call to open 40 // creating instance if needed. Each call to open
41 // must be balanced with a call to CloseStorageArea. 41 // must be balanced with a call to CloseStorageArea.
42 DomStorageArea* OpenStorageArea(const GURL& origin); 42 DomStorageArea* OpenStorageArea(const GURL& origin);
43 void CloseStorageArea(DomStorageArea* area); 43 void CloseStorageArea(DomStorageArea* area);
44 44
45 // Creates a clone of |this| namespace including 45 // Creates a clone of |this| namespace including
46 // shallow copies of all contained areas. 46 // shallow copies of all contained areas.
47 // Should only be called for session storage namespaces. 47 // Should only be called for session storage namespaces.
48 DomStorageNamespace* Clone(int64 clone_namespace_id); 48 DomStorageNamespace* Clone(int64 clone_namespace_id);
49 49
50 void DeleteOrigin(const GURL& origin);
50 void PurgeMemory(); 51 void PurgeMemory();
51 void Shutdown(); 52 void Shutdown();
52 53
53 private: 54 private:
54 friend class base::RefCountedThreadSafe<DomStorageNamespace>; 55 friend class base::RefCountedThreadSafe<DomStorageNamespace>;
55 56
56 // Struct to hold references to our contained areas and 57 // Struct to hold references to our contained areas and
57 // to keep track of how many tabs have a given area open. 58 // to keep track of how many tabs have a given area open.
58 struct AreaHolder { 59 struct AreaHolder {
59 scoped_refptr<DomStorageArea> area_; 60 scoped_refptr<DomStorageArea> area_;
(...skipping 12 matching lines...) Expand all
72 int64 namespace_id_; 73 int64 namespace_id_;
73 FilePath directory_; 74 FilePath directory_;
74 AreaMap areas_; 75 AreaMap areas_;
75 scoped_refptr<DomStorageTaskRunner> task_runner_; 76 scoped_refptr<DomStorageTaskRunner> task_runner_;
76 }; 77 };
77 78
78 } // namespace dom_storage 79 } // namespace dom_storage
79 80
80 81
81 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_ 82 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_
OLDNEW
« no previous file with comments | « webkit/dom_storage/dom_storage_database_unittest.cc ('k') | webkit/dom_storage/dom_storage_namespace.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698