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

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

Issue 17033004: Tell IDB frontend about data loss (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove debug Created 7 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_DATABASE_H_ 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void RemoveObjectStore(int64 object_store_id); 60 void RemoveObjectStore(int64 object_store_id);
61 void AddIndex(int64 object_store_id, 61 void AddIndex(int64 object_store_id,
62 const IndexedDBIndexMetadata& metadata, 62 const IndexedDBIndexMetadata& metadata,
63 int64 new_max_index_id); 63 int64 new_max_index_id);
64 void RemoveIndex(int64 object_store_id, int64 index_id); 64 void RemoveIndex(int64 object_store_id, int64 index_id);
65 65
66 void OpenConnection( 66 void OpenConnection(
67 scoped_refptr<IndexedDBCallbacksWrapper> callbacks, 67 scoped_refptr<IndexedDBCallbacksWrapper> callbacks,
68 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks, 68 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks,
69 int64 transaction_id, 69 int64 transaction_id,
70 int64 version); 70 int64 version,
71 bool data_loss);
71 void DeleteDatabase(scoped_refptr<IndexedDBCallbacksWrapper> callbacks); 72 void DeleteDatabase(scoped_refptr<IndexedDBCallbacksWrapper> callbacks);
72 const IndexedDBDatabaseMetadata& metadata() const { return metadata_; } 73 const IndexedDBDatabaseMetadata& metadata() const { return metadata_; }
73 74
74 void CreateObjectStore(int64 transaction_id, 75 void CreateObjectStore(int64 transaction_id,
75 int64 object_store_id, 76 int64 object_store_id,
76 const string16& name, 77 const string16& name,
77 const IndexedDBKeyPath& key_path, 78 const IndexedDBKeyPath& key_path,
78 bool auto_increment); 79 bool auto_increment);
79 void DeleteObjectStore(int64 transaction_id, int64 object_store_id); 80 void DeleteObjectStore(int64 transaction_id, int64 object_store_id);
80 void CreateTransaction( 81 void CreateTransaction(
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 IndexedDBFactory* factory, 158 IndexedDBFactory* factory,
158 const string16& unique_identifier); 159 const string16& unique_identifier);
159 ~IndexedDBDatabase(); 160 ~IndexedDBDatabase();
160 161
161 bool IsOpenConnectionBlocked() const; 162 bool IsOpenConnectionBlocked() const;
162 bool OpenInternal(); 163 bool OpenInternal();
163 void RunVersionChangeTransaction( 164 void RunVersionChangeTransaction(
164 scoped_refptr<IndexedDBCallbacksWrapper> callbacks, 165 scoped_refptr<IndexedDBCallbacksWrapper> callbacks,
165 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks, 166 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks,
166 int64 transaction_id, 167 int64 transaction_id,
167 int64 requested_version); 168 int64 requested_version,
169 bool data_loss);
168 void RunVersionChangeTransactionFinal( 170 void RunVersionChangeTransactionFinal(
169 scoped_refptr<IndexedDBCallbacksWrapper> callbacks, 171 scoped_refptr<IndexedDBCallbacksWrapper> callbacks,
170 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks, 172 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks,
171 int64 transaction_id, 173 int64 transaction_id,
172 int64 requested_version); 174 int64 requested_version,
175 bool data_loss);
173 size_t ConnectionCount() const; 176 size_t ConnectionCount() const;
174 void ProcessPendingCalls(); 177 void ProcessPendingCalls();
175 178
176 bool IsDeleteDatabaseBlocked() const; 179 bool IsDeleteDatabaseBlocked() const;
177 void DeleteDatabaseFinal(scoped_refptr<IndexedDBCallbacksWrapper> callbacks); 180 void DeleteDatabaseFinal(scoped_refptr<IndexedDBCallbacksWrapper> callbacks);
178 181
179 class VersionChangeOperation; 182 class VersionChangeOperation;
180 183
181 // When a "versionchange" transaction aborts, these restore the back-end 184 // When a "versionchange" transaction aborts, these restore the back-end
182 // object hierarchy. 185 // object hierarchy.
(...skipping 26 matching lines...) Expand all
209 typedef list_set<scoped_refptr<IndexedDBDatabaseCallbacksWrapper> > 212 typedef list_set<scoped_refptr<IndexedDBDatabaseCallbacksWrapper> >
210 DatabaseCallbacksSet; 213 DatabaseCallbacksSet;
211 DatabaseCallbacksSet database_callbacks_set_; 214 DatabaseCallbacksSet database_callbacks_set_;
212 215
213 bool closing_connection_; 216 bool closing_connection_;
214 }; 217 };
215 218
216 } // namespace content 219 } // namespace content
217 220
218 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ 221 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698