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

Unified Diff: third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.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 test coverage for the (slightly incorrect) behavior in strict mode when our flag is not enabl… 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: third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.h
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.h b/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.h
index 8ee6519da8f203f6902bf6ba4a2385450faec8b6..9349f10380237c95024c5baf0788d9d093d8318c 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.h
@@ -62,6 +62,7 @@ public:
// Implement the IDBObjectStore IDL
int64_t id() const { return m_metadata.id; }
const String& name() const { return m_metadata.name; }
+ void setName(const String& name, ExceptionState&);
ScriptValue keyPath(ScriptState*) const;
DOMStringList* indexNames() const;
IDBTransaction* transaction() const { return m_transaction.get(); }
@@ -105,6 +106,13 @@ public:
typedef HeapVector<Member<IDBKey>> IndexKeys;
+ // Used by IDBIndex::setName:
+ bool containsIndex(const String& name) const
+ {
+ return findIndexId(name) != IDBIndexMetadata::InvalidId;
+ }
+ void indexRenamed(int64_t indexId, const String& newName);
+
WebIDBDatabase* backendDB() const;
private:
@@ -114,10 +122,6 @@ private:
IDBRequest* put(ScriptState*, WebIDBPutMode, IDBAny* source, const ScriptValue&, const ScriptValue& key, ExceptionState&);
int64_t findIndexId(const String& name) const;
- bool containsIndex(const String& name) const
- {
- return findIndexId(name) != IDBIndexMetadata::InvalidId;
- }
IDBObjectStoreMetadata m_metadata;
Member<IDBTransaction> m_transaction;

Powered by Google App Engine
This is Rietveld 408576698