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

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

Issue 9389009: Hook up DomStorageArea with a DomStorageDatabase. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename CommitChanges* methods. Created 8 years, 10 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 TestLazyOpenUpgradesDatabase); 46 TestLazyOpenUpgradesDatabase);
47 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, SimpleWriteAndReadBack); 47 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, SimpleWriteAndReadBack);
48 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, WriteWithClear); 48 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, WriteWithClear);
49 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, 49 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest,
50 UpgradeFromV1ToV2WithData); 50 UpgradeFromV1ToV2WithData);
51 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, TestSimpleRemoveOneValue); 51 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, TestSimpleRemoveOneValue);
52 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, 52 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest,
53 TestCanOpenAndReadWebCoreDatabase); 53 TestCanOpenAndReadWebCoreDatabase);
54 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, 54 FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest,
55 TestCanOpenFileThatIsNotADatabase); 55 TestCanOpenFileThatIsNotADatabase);
56 FRIEND_TEST_ALL_PREFIXES(DomStorageAreaTest, BackingDatabaseOpened);
56 57
57 enum SchemaVersion { 58 enum SchemaVersion {
58 INVALID, 59 INVALID,
59 V1, 60 V1,
60 V2 61 V2
61 }; 62 };
62 63
63 // Open the database at file_path_ if it exists already and creates it if 64 // Open the database at file_path_ if it exists already and creates it if
64 // |create_if_needed| is true. 65 // |create_if_needed| is true.
65 // Ensures we are at the correct database version and creates or updates 66 // Ensures we are at the correct database version and creates or updates
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // Path to the database on disk. 105 // Path to the database on disk.
105 FilePath file_path_; 106 FilePath file_path_;
106 scoped_ptr<sql::Connection> db_; 107 scoped_ptr<sql::Connection> db_;
107 bool failed_to_open_; 108 bool failed_to_open_;
108 bool tried_to_recreate_; 109 bool tried_to_recreate_;
109 }; 110 };
110 111
111 } // namespace dom_storage 112 } // namespace dom_storage
112 113
113 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_DATABASE_H_ 114 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_DATABASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698