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

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

Issue 12398008: Purge in-memory localStorage areas if the # of areas exceeds the limit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 7 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 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 AreaHolder(DomStorageArea* area, int count); 74 AreaHolder(DomStorageArea* area, int count);
75 ~AreaHolder(); 75 ~AreaHolder();
76 }; 76 };
77 typedef std::map<GURL, AreaHolder> AreaMap; 77 typedef std::map<GURL, AreaHolder> AreaMap;
78 78
79 ~DomStorageNamespace(); 79 ~DomStorageNamespace();
80 80
81 // Returns a pointer to the area holder in our map or NULL. 81 // Returns a pointer to the area holder in our map or NULL.
82 AreaHolder* GetAreaHolder(const GURL& origin); 82 AreaHolder* GetAreaHolder(const GURL& origin);
83 83
84 friend class DomStorageContext;
85 const AreaMap& GetAreaMap() const { return areas_; }
86
84 int64 namespace_id_; 87 int64 namespace_id_;
85 std::string persistent_namespace_id_; 88 std::string persistent_namespace_id_;
86 base::FilePath directory_; 89 base::FilePath directory_;
87 AreaMap areas_; 90 AreaMap areas_;
88 scoped_refptr<DomStorageTaskRunner> task_runner_; 91 scoped_refptr<DomStorageTaskRunner> task_runner_;
89 scoped_refptr<SessionStorageDatabase> session_storage_database_; 92 scoped_refptr<SessionStorageDatabase> session_storage_database_;
90 }; 93 };
91 94
92 } // namespace dom_storage 95 } // namespace dom_storage
93 96
94 97
95 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_ 98 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698