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

Unified Diff: third_party/WebKit/Source/modules/indexeddb/IDBIndex.h

Issue 2349413002: Minor IndexedDB refactorings. (Closed)
Patch Set: Rebased 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/IDBIndex.h
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBIndex.h b/third_party/WebKit/Source/modules/indexeddb/IDBIndex.h
index 77c907c495641f8871b9c0721d06f2e45d7b9065..041080d529e2b88f50ba00f69004cadb6ad38c75 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBIndex.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBIndex.h
@@ -54,12 +54,12 @@ public:
DECLARE_TRACE();
// Implement the IDL
- const String& name() const { return m_metadata.name; }
+ const String& name() const { return metadata().name; }
void setName(const String& name, ExceptionState&);
IDBObjectStore* objectStore() const { return m_objectStore.get(); }
ScriptValue keyPath(ScriptState*) const;
- bool unique() const { return m_metadata.unique; }
- bool multiEntry() const { return m_metadata.multiEntry; }
+ bool unique() const { return metadata().unique; }
+ bool multiEntry() const { return metadata().multiEntry; }
IDBRequest* openCursor(ScriptState*, const ScriptValue& key, const String& direction, ExceptionState&);
IDBRequest* openKeyCursor(ScriptState*, const ScriptValue& range, const String& direction, ExceptionState&);
@@ -73,7 +73,7 @@ public:
void markDeleted() { m_deleted = true; }
bool isDeleted() const;
- int64_t id() const { return m_metadata.id; }
+ int64_t id() const { return metadata().id; }
// Used internally and by InspectorIndexedDBAgent:
IDBRequest* openCursor(ScriptState*, IDBKeyRange*, WebIDBCursorDirection);
@@ -83,6 +83,8 @@ public:
private:
IDBIndex(const IDBIndexMetadata&, IDBObjectStore*, IDBTransaction*);
+ const IDBIndexMetadata& metadata() const { return m_metadata; }
+
IDBRequest* getInternal(ScriptState*, const ScriptValue& key, ExceptionState&, bool keyOnly);
IDBRequest* getAllInternal(ScriptState*, const ScriptValue& range, unsigned long maxCount, ExceptionState&, bool keyOnly);
« no previous file with comments | « third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp ('k') | third_party/WebKit/Source/modules/indexeddb/IDBIndex.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698