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

Unified Diff: content/browser/indexed_db/indexed_db_database.h

Issue 2276593002: Support renaming of IndexedDB indexes and object stores. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added tests for create rename in the same aborted transaction. Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/indexed_db/indexed_db_database.h
diff --git a/content/browser/indexed_db/indexed_db_database.h b/content/browser/indexed_db/indexed_db_database.h
index 3c3d69bde75f6498ccf2652e3e2375e57be79abc..95bcb5a83f607679b56666287d6787f058738428 100644
--- a/content/browser/indexed_db/indexed_db_database.h
+++ b/content/browser/indexed_db/indexed_db_database.h
@@ -74,10 +74,14 @@ class CONTENT_EXPORT IndexedDBDatabase
void AddObjectStore(const IndexedDBObjectStoreMetadata& metadata,
int64_t new_max_object_store_id);
void RemoveObjectStore(int64_t object_store_id);
+ void SetObjectStoreName(int64_t object_store_id, const base::string16& name);
void AddIndex(int64_t object_store_id,
const IndexedDBIndexMetadata& metadata,
int64_t new_max_index_id);
void RemoveIndex(int64_t object_store_id, int64_t index_id);
+ void SetIndexName(int64_t object_store_id,
+ int64_t index_id,
+ const base::string16& name);
void OpenConnection(std::unique_ptr<IndexedDBPendingConnection> connection);
void DeleteDatabase(scoped_refptr<IndexedDBCallbacks> callbacks);
@@ -89,6 +93,9 @@ class CONTENT_EXPORT IndexedDBDatabase
const IndexedDBKeyPath& key_path,
bool auto_increment);
void DeleteObjectStore(int64_t transaction_id, int64_t object_store_id);
+ void RenameObjectStore(int64_t transaction_id,
+ int64_t object_store_id,
+ const base::string16& new_name);
// Returns a pointer to a newly created transaction. The object is owned
// by |transaction_coordinator_|.
@@ -119,6 +126,10 @@ class CONTENT_EXPORT IndexedDBDatabase
void DeleteIndex(int64_t transaction_id,
int64_t object_store_id,
int64_t index_id);
+ void RenameIndex(int64_t transaction_id,
+ int64_t object_store_id,
+ int64_t index_id,
+ const base::string16& new_name);
IndexedDBTransactionCoordinator& transaction_coordinator() {
return transaction_coordinator_;
@@ -213,6 +224,9 @@ class CONTENT_EXPORT IndexedDBDatabase
void DeleteObjectStoreAbortOperation(
const IndexedDBObjectStoreMetadata& object_store_metadata,
IndexedDBTransaction* transaction);
+ void RenameObjectStoreAbortOperation(int64_t object_store_id,
+ const base::string16 old_name,
jsbell 2016/09/07 17:16:13 Can be a const ref.
pwnall 2016/09/07 22:43:52 Done. Thank you!
+ IndexedDBTransaction* transaction);
void VersionChangeOperation(int64_t version,
scoped_refptr<IndexedDBCallbacks> callbacks,
IndexedDBTransaction* transaction);
@@ -227,6 +241,10 @@ class CONTENT_EXPORT IndexedDBDatabase
void DeleteIndexAbortOperation(int64_t object_store_id,
const IndexedDBIndexMetadata& index_metadata,
IndexedDBTransaction* transaction);
+ void RenameIndexAbortOperation(int64_t object_store_id,
+ int64_t index_id,
+ const base::string16 old_name,
jsbell 2016/09/07 17:16:13 Ditto.
pwnall 2016/09/07 22:43:52 Done.
+ IndexedDBTransaction* transaction);
void GetOperation(int64_t object_store_id,
int64_t index_id,
std::unique_ptr<IndexedDBKeyRange> key_range,

Powered by Google App Engine
This is Rietveld 408576698