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

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

Issue 9963107: Persist sessionStorage on disk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 8 years, 5 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_SESSION_STORAGE_DATABASE_H_ 5 #ifndef WEBKIT_DOM_STORAGE_SESSION_STORAGE_DATABASE_H_
6 #define WEBKIT_DOM_STORAGE_SESSION_STORAGE_DATABASE_H_ 6 #define WEBKIT_DOM_STORAGE_SESSION_STORAGE_DATABASE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 // Deletes the data for |namespace_id| and |origin|. 60 // Deletes the data for |namespace_id| and |origin|.
61 bool DeleteArea(const std::string& namespace_id, const GURL& origin); 61 bool DeleteArea(const std::string& namespace_id, const GURL& origin);
62 62
63 // Deletes the data for |namespace_id|. 63 // Deletes the data for |namespace_id|.
64 bool DeleteNamespace(const std::string& namespace_id); 64 bool DeleteNamespace(const std::string& namespace_id);
65 65
66 // Reads all namespace IDs from the database. 66 // Reads all namespace IDs from the database.
67 bool ReadNamespaceIds(std::vector<std::string>* namespace_ids); 67 bool ReadNamespaceIds(std::vector<std::string>* namespace_ids);
68 68
69 // Reads all origins which have data stored in |namespace_id|.
70 bool ReadOriginsInNamespace(const std::string& namespace_id,
71 std::vector<GURL>* origins);
72
69 private: 73 private:
70 friend class base::RefCountedThreadSafe<SessionStorageDatabase>; 74 friend class base::RefCountedThreadSafe<SessionStorageDatabase>;
71 friend class SessionStorageDatabaseTest; 75 friend class SessionStorageDatabaseTest;
72 76
73 ~SessionStorageDatabase(); 77 ~SessionStorageDatabase();
74 78
75 // Opens the database at file_path_ if it exists already and creates it if 79 // Opens the database at file_path_ if it exists already and creates it if
76 // |create_if_needed| is true. Returns true if the database was opened, false 80 // |create_if_needed| is true. Returns true if the database was opened, false
77 // if the opening failed or was not necessary (the database doesn't exist and 81 // if the opening failed or was not necessary (the database doesn't exist and
78 // |create_if_needed| is false). The possible failures are: 82 // |create_if_needed| is false). The possible failures are:
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 bool db_error_; 192 bool db_error_;
189 // True if the database is in an inconsistent state. 193 // True if the database is in an inconsistent state.
190 bool is_inconsistent_; 194 bool is_inconsistent_;
191 195
192 DISALLOW_COPY_AND_ASSIGN(SessionStorageDatabase); 196 DISALLOW_COPY_AND_ASSIGN(SessionStorageDatabase);
193 }; 197 };
194 198
195 } // namespace dom_storage 199 } // namespace dom_storage
196 200
197 #endif // WEBKIT_DOM_STORAGE_SESSION_STORAGE_DATABASE_H_ 201 #endif // WEBKIT_DOM_STORAGE_SESSION_STORAGE_DATABASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698