| Index: webkit/dom_storage/session_storage_database.h
|
| diff --git a/webkit/dom_storage/session_storage_database.h b/webkit/dom_storage/session_storage_database.h
|
| index eb03993f7e6d45e276ffeb55116e4bf0fd9955f3..ddf9b00959b55888e8af2ccfb0c89048f8d53b6e 100644
|
| --- a/webkit/dom_storage/session_storage_database.h
|
| +++ b/webkit/dom_storage/session_storage_database.h
|
| @@ -20,6 +20,7 @@ class GURL;
|
|
|
| namespace leveldb {
|
| class DB;
|
| +class ReadOptions;
|
| class WriteBatch;
|
| } // namespace leveldb
|
|
|
| @@ -28,6 +29,9 @@ namespace dom_storage {
|
| // SessionStorageDatabase holds the data from multiple namespaces and multiple
|
| // origins. All DomStorageAreas for session storage share the same
|
| // SessionStorageDatabase.
|
| +
|
| +// Only one thread is allowed to call the public functions other than
|
| +// ReadAreaValues. Other threads area allowed to call ReadAreaValues.
|
| class SessionStorageDatabase :
|
| public base::RefCountedThreadSafe<SessionStorageDatabase> {
|
| public:
|
| @@ -66,6 +70,10 @@ class SessionStorageDatabase :
|
| // Reads all namespace IDs from the database.
|
| bool ReadNamespaceIds(std::vector<std::string>* namespace_ids);
|
|
|
| + // Reads all origins which have data stored in |namespace_id|.
|
| + bool ReadOriginsInNamespace(const std::string& namespace_id,
|
| + std::vector<GURL>* origins);
|
| +
|
| private:
|
| friend class base::RefCountedThreadSafe<SessionStorageDatabase>;
|
| friend class SessionStorageDatabaseTest;
|
| @@ -126,6 +134,7 @@ class SessionStorageDatabase :
|
| // the map doesn't exist.
|
| bool GetMapForArea(const std::string& namespace_id,
|
| const std::string& origin,
|
| + const leveldb::ReadOptions& options,
|
| bool* exists,
|
| std::string* map_id);
|
|
|
| @@ -141,6 +150,7 @@ class SessionStorageDatabase :
|
| // true, only keys are aread from the database and the values in |result| will
|
| // be empty.
|
| bool ReadMap(const std::string& map_id,
|
| + const leveldb::ReadOptions& options,
|
| ValuesMap* result,
|
| bool only_keys);
|
| // Writes |values| into the map |map_id|.
|
|
|