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

Side by Side Diff: content/browser/indexed_db/indexed_db_factory_impl.h

Issue 2773823002: Use a two-part data format version in IndexedDB metadata. (Closed)
Patch Set: jsbell, cmumford Created 3 years, 8 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
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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 CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_IMPL_H_ 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_IMPL_H_
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_IMPL_H_ 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 14 matching lines...) Expand all
25 class IndexedDBContextImpl; 25 class IndexedDBContextImpl;
26 26
27 class CONTENT_EXPORT IndexedDBFactoryImpl : public IndexedDBFactory { 27 class CONTENT_EXPORT IndexedDBFactoryImpl : public IndexedDBFactory {
28 public: 28 public:
29 explicit IndexedDBFactoryImpl(IndexedDBContextImpl* context); 29 explicit IndexedDBFactoryImpl(IndexedDBContextImpl* context);
30 30
31 // content::IndexedDBFactory overrides: 31 // content::IndexedDBFactory overrides:
32 void ReleaseDatabase(const IndexedDBDatabase::Identifier& identifier, 32 void ReleaseDatabase(const IndexedDBDatabase::Identifier& identifier,
33 bool forced_close) override; 33 bool forced_close) override;
34 34
35 void GetDatabaseNames(scoped_refptr<IndexedDBCallbacks> callbacks, 35 void GetDatabaseNames(
36 const url::Origin& origin, 36 scoped_refptr<IndexedDBCallbacks> callbacks,
37 const base::FilePath& data_directory, 37 const url::Origin& origin,
38 scoped_refptr<net::URLRequestContextGetter> 38 const base::FilePath& data_directory,
39 request_context_getter) override; 39 const IndexedDBDataFormatVersion& client_data_format_version,
40 void Open(const base::string16& name, 40 scoped_refptr<net::URLRequestContextGetter> request_context_getter)
41 std::unique_ptr<IndexedDBPendingConnection> connection, 41 override;
42 scoped_refptr<net::URLRequestContextGetter> request_context_getter, 42 void Open(
43 const url::Origin& origin, 43 const base::string16& name,
44 const base::FilePath& data_directory) override; 44 std::unique_ptr<IndexedDBPendingConnection> connection,
45 scoped_refptr<net::URLRequestContextGetter> request_context_getter,
46 const url::Origin& origin,
47 const base::FilePath& data_directory,
48 const IndexedDBDataFormatVersion& client_data_format_version) override;
45 49
46 void DeleteDatabase( 50 void DeleteDatabase(
47 const base::string16& name, 51 const base::string16& name,
48 scoped_refptr<net::URLRequestContextGetter> request_context_getter, 52 scoped_refptr<net::URLRequestContextGetter> request_context_getter,
49 scoped_refptr<IndexedDBCallbacks> callbacks, 53 scoped_refptr<IndexedDBCallbacks> callbacks,
50 const url::Origin& origin, 54 const url::Origin& origin,
51 const base::FilePath& data_directory, 55 const base::FilePath& data_directory,
56 const IndexedDBDataFormatVersion& client_data_format_version,
52 bool force_close) override; 57 bool force_close) override;
53 58
54 void HandleBackingStoreFailure(const url::Origin& origin) override; 59 void HandleBackingStoreFailure(const url::Origin& origin) override;
55 void HandleBackingStoreCorruption( 60 void HandleBackingStoreCorruption(
56 const url::Origin& origin, 61 const url::Origin& origin,
57 const IndexedDBDatabaseError& error) override; 62 const IndexedDBDatabaseError& error) override;
58 63
59 OriginDBs GetOpenDatabasesForOrigin(const url::Origin& origin) const override; 64 OriginDBs GetOpenDatabasesForOrigin(const url::Origin& origin) const override;
60 65
61 void ForceClose(const url::Origin& origin) override; 66 void ForceClose(const url::Origin& origin) override;
(...skipping 10 matching lines...) Expand all
72 const IndexedDBDatabase::Identifier& identifier) override; 77 const IndexedDBDatabase::Identifier& identifier) override;
73 78
74 size_t GetConnectionCount(const url::Origin& origin) const override; 79 size_t GetConnectionCount(const url::Origin& origin) const override;
75 80
76 protected: 81 protected:
77 ~IndexedDBFactoryImpl() override; 82 ~IndexedDBFactoryImpl() override;
78 83
79 scoped_refptr<IndexedDBBackingStore> OpenBackingStore( 84 scoped_refptr<IndexedDBBackingStore> OpenBackingStore(
80 const url::Origin& origin, 85 const url::Origin& origin,
81 const base::FilePath& data_directory, 86 const base::FilePath& data_directory,
87 const IndexedDBDataFormatVersion& client_data_format_version,
82 scoped_refptr<net::URLRequestContextGetter> request_context_getter, 88 scoped_refptr<net::URLRequestContextGetter> request_context_getter,
83 IndexedDBDataLossInfo* data_loss_info, 89 IndexedDBDataLossInfo* data_loss_info,
84 bool* disk_full, 90 bool* disk_full,
85 leveldb::Status* s) override; 91 leveldb::Status* s) override;
86 92
87 scoped_refptr<IndexedDBBackingStore> OpenBackingStoreHelper( 93 scoped_refptr<IndexedDBBackingStore> OpenBackingStoreHelper(
88 const url::Origin& origin, 94 const url::Origin& origin,
89 const base::FilePath& data_directory, 95 const base::FilePath& data_directory,
96 const IndexedDBDataFormatVersion& client_data_format_version,
90 scoped_refptr<net::URLRequestContextGetter> request_context_getter, 97 scoped_refptr<net::URLRequestContextGetter> request_context_getter,
91 IndexedDBDataLossInfo* data_loss_info, 98 IndexedDBDataLossInfo* data_loss_info,
92 bool* disk_full, 99 bool* disk_full,
93 bool first_time, 100 bool first_time,
94 leveldb::Status* s) override; 101 leveldb::Status* s) override;
95 102
96 void ReleaseBackingStore(const url::Origin& origin, bool immediate); 103 void ReleaseBackingStore(const url::Origin& origin, bool immediate);
97 void CloseBackingStore(const url::Origin& origin); 104 void CloseBackingStore(const url::Origin& origin);
98 IndexedDBContextImpl* context() const { return context_; } 105 IndexedDBContextImpl* context() const { return context_; }
99 106
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 std::map<url::Origin, scoped_refptr<IndexedDBBackingStore>> 142 std::map<url::Origin, scoped_refptr<IndexedDBBackingStore>>
136 backing_stores_with_active_blobs_; 143 backing_stores_with_active_blobs_;
137 std::set<url::Origin> backends_opened_since_boot_; 144 std::set<url::Origin> backends_opened_since_boot_;
138 145
139 DISALLOW_COPY_AND_ASSIGN(IndexedDBFactoryImpl); 146 DISALLOW_COPY_AND_ASSIGN(IndexedDBFactoryImpl);
140 }; 147 };
141 148
142 } // namespace content 149 } // namespace content
143 150
144 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_IMPL_H_ 151 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698