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

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

Issue 9963107: Persist sessionStorage on disk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review. Created 8 years, 6 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_DATABASE_H_ 5 #ifndef WEBKIT_DOM_STORAGE_DOM_STORAGE_DATABASE_H_
6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_DATABASE_H_ 6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_DATABASE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 30 matching lines...) Expand all
41 bool CommitChanges(bool clear_all_first, const ValuesMap& changes); 41 bool CommitChanges(bool clear_all_first, const ValuesMap& changes);
42 42
43 // Simple getter for the path we were constructed with. 43 // Simple getter for the path we were constructed with.
44 const FilePath& file_path() const { return file_path_; } 44 const FilePath& file_path() const { return file_path_; }
45 45
46 protected: 46 protected:
47 // Constructor that uses an in-memory sqlite database, for testing. 47 // Constructor that uses an in-memory sqlite database, for testing.
48 DomStorageDatabase(); 48 DomStorageDatabase();
49 49
50 private: 50 private:
51 friend class LocalStorageDatabaseAdapter;
51 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, SimpleOpenAndClose); 52 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, SimpleOpenAndClose);
52 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, TestLazyOpenIsLazy); 53 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, TestLazyOpenIsLazy);
53 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, TestDetectSchemaVersion); 54 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, TestDetectSchemaVersion);
54 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, 55 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest,
55 TestLazyOpenUpgradesDatabase); 56 TestLazyOpenUpgradesDatabase);
56 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, SimpleWriteAndReadBack); 57 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, SimpleWriteAndReadBack);
57 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, WriteWithClear); 58 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, WriteWithClear);
58 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, 59 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest,
59 UpgradeFromV1ToV2WithData); 60 UpgradeFromV1ToV2WithData);
60 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, TestSimpleRemoveOneValue); 61 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, TestSimpleRemoveOneValue);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 const FilePath file_path_; 110 const FilePath file_path_;
110 scoped_ptr<sql::Connection> db_; 111 scoped_ptr<sql::Connection> db_;
111 bool failed_to_open_; 112 bool failed_to_open_;
112 bool tried_to_recreate_; 113 bool tried_to_recreate_;
113 bool known_to_be_empty_; 114 bool known_to_be_empty_;
114 }; 115 };
115 116
116 } // namespace dom_storage 117 } // namespace dom_storage
117 118
118 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_DATABASE_H_ 119 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_DATABASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698