IndexedDB: Remove unused backend property accessors
authorjsbell@chromium.org <jsbell@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Jun 2012 21:57:14 +0000 (21:57 +0000)
committerjsbell@chromium.org <jsbell@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Jun 2012 21:57:14 +0000 (21:57 +0000)
https://bugs.webkit.org/show_bug.cgi?id=89893

Reviewed by Darin Fisher.

Source/WebCore:

Following the "metadata" API addition in trac.webkit.org/changeset/121059
the IDBXXXBackendInterface types no longer need per-property accessors.

No new tests - no functional changes.

* Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Remove method implementation.
* Modules/indexeddb/IDBDatabaseBackendImpl.h: Remove methods.
(IDBDatabaseBackendImpl):
* Modules/indexeddb/IDBDatabaseBackendInterface.h: Remove methods.
(IDBDatabaseBackendInterface):
* Modules/indexeddb/IDBIndexBackendImpl.h: Make methods simple accessors.
(IDBIndexBackendImpl):
(WebCore::IDBIndexBackendImpl::name):
(WebCore::IDBIndexBackendImpl::keyPath):
(WebCore::IDBIndexBackendImpl::unique):
(WebCore::IDBIndexBackendImpl::multiEntry):
* Modules/indexeddb/IDBIndexBackendInterface.h: Remove methods.
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: Remove method implementation.
* Modules/indexeddb/IDBObjectStoreBackendImpl.h: Make methods simple accessors.
(IDBObjectStoreBackendImpl):
(WebCore::IDBObjectStoreBackendImpl::name):
(WebCore::IDBObjectStoreBackendImpl::keyPath):
(WebCore::IDBObjectStoreBackendImpl::autoIncrement):
* Modules/indexeddb/IDBObjectStoreBackendInterface.h: Remove methods.

Source/WebKit/chromium:

Following the "metadata" API addition in trac.webkit.org/changeset/121059
per-property accessors can be removed from the Chromium WebKit API.

* src/WebIDBDatabaseImpl.cpp: Removed name, version, objectStoreNames.
* src/WebIDBDatabaseImpl.h:
(WebIDBDatabaseImpl):
* src/WebIDBIndexImpl.cpp: Removed name, keyPath, unique, multiEntry.
* src/WebIDBIndexImpl.h:
(WebIDBIndexImpl):
* src/WebIDBObjectStoreImpl.cpp: Removed name, keyPath, autoIncrement, indexNames.
* src/WebIDBObjectStoreImpl.h:
(WebIDBObjectStoreImpl):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121183 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp
Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h
Source/WebCore/Modules/indexeddb/IDBDatabaseBackendInterface.h
Source/WebCore/Modules/indexeddb/IDBIndexBackendImpl.h
Source/WebCore/Modules/indexeddb/IDBIndexBackendInterface.h
Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.cpp
Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.h
Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendInterface.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
Source/WebKit/chromium/src/WebIDBDatabaseImpl.h
Source/WebKit/chromium/src/WebIDBIndexImpl.cpp
Source/WebKit/chromium/src/WebIDBIndexImpl.h
Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h

index 016bfd5..c2b0636 100644 (file)
@@ -1,3 +1,35 @@
+2012-06-25  Joshua Bell  <jsbell@chromium.org>
+
+        IndexedDB: Remove unused backend property accessors
+        https://bugs.webkit.org/show_bug.cgi?id=89893
+
+        Reviewed by Darin Fisher.
+
+        Following the "metadata" API addition in trac.webkit.org/changeset/121059
+        the IDBXXXBackendInterface types no longer need per-property accessors.
+
+        No new tests - no functional changes.
+
+        * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Remove method implementation.
+        * Modules/indexeddb/IDBDatabaseBackendImpl.h: Remove methods.
+        (IDBDatabaseBackendImpl):
+        * Modules/indexeddb/IDBDatabaseBackendInterface.h: Remove methods.
+        (IDBDatabaseBackendInterface):
+        * Modules/indexeddb/IDBIndexBackendImpl.h: Make methods simple accessors.
+        (IDBIndexBackendImpl):
+        (WebCore::IDBIndexBackendImpl::name):
+        (WebCore::IDBIndexBackendImpl::keyPath):
+        (WebCore::IDBIndexBackendImpl::unique):
+        (WebCore::IDBIndexBackendImpl::multiEntry):
+        * Modules/indexeddb/IDBIndexBackendInterface.h: Remove methods.
+        * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: Remove method implementation.
+        * Modules/indexeddb/IDBObjectStoreBackendImpl.h: Make methods simple accessors.
+        (IDBObjectStoreBackendImpl):
+        (WebCore::IDBObjectStoreBackendImpl::name):
+        (WebCore::IDBObjectStoreBackendImpl::keyPath):
+        (WebCore::IDBObjectStoreBackendImpl::autoIncrement):
+        * Modules/indexeddb/IDBObjectStoreBackendInterface.h: Remove methods.
+
 2012-06-25  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
 
         [EFL] Add support for building with ENABLE_MEDIA_STREAM
index b636d80..5cccaa2 100644 (file)
@@ -142,15 +142,6 @@ IDBDatabaseMetadata IDBDatabaseBackendImpl::metadata() const
     return metadata;
 }
 
-PassRefPtr<DOMStringList> IDBDatabaseBackendImpl::objectStoreNames() const
-{
-    RefPtr<DOMStringList> objectStoreNames = DOMStringList::create();
-    for (ObjectStoreMap::const_iterator it = m_objectStores.begin(); it != m_objectStores.end(); ++it)
-        objectStoreNames->append(it->first);
-    objectStoreNames->sort();
-    return objectStoreNames.release();
-}
-
 PassRefPtr<IDBObjectStoreBackendInterface> IDBDatabaseBackendImpl::createObjectStore(const String& name, const IDBKeyPath& keyPath, bool autoIncrement, IDBTransactionBackendInterface* transactionPtr, ExceptionCode& ec)
 {
     ASSERT(transactionPtr->mode() == IDBTransaction::VERSION_CHANGE);
index 36eb241..21f4f93 100644 (file)
@@ -59,9 +59,6 @@ public:
     void deleteDatabase(PassRefPtr<IDBCallbacks>);
 
     virtual IDBDatabaseMetadata metadata() const;
-    virtual String name() const { return m_name; }
-    virtual String version() const { return m_version; }
-    virtual PassRefPtr<DOMStringList> objectStoreNames() const;
 
     virtual PassRefPtr<IDBObjectStoreBackendInterface> createObjectStore(const String& name, const IDBKeyPath&, bool autoIncrement, IDBTransactionBackendInterface*, ExceptionCode&);
     virtual void deleteObjectStore(const String& name, IDBTransactionBackendInterface*, ExceptionCode&);
index d581777..0f6b35d 100644 (file)
@@ -54,9 +54,6 @@ public:
     virtual ~IDBDatabaseBackendInterface() { }
 
     virtual IDBDatabaseMetadata metadata() const = 0;
-    virtual String name() const = 0;
-    virtual String version() const = 0;
-    virtual PassRefPtr<DOMStringList> objectStoreNames() const = 0;
 
     virtual PassRefPtr<IDBObjectStoreBackendInterface> createObjectStore(const String& name, const IDBKeyPath&, bool autoIncrement, IDBTransactionBackendInterface*, ExceptionCode&) = 0;
     virtual void deleteObjectStore(const String& name, IDBTransactionBackendInterface*, ExceptionCode&) = 0;
index 6410cba..9838512 100644 (file)
@@ -65,10 +65,6 @@ public:
 
     // Implements IDBIndexBackendInterface.
     virtual IDBIndexMetadata metadata() const;
-    virtual String name() { return m_name; }
-    virtual IDBKeyPath keyPath() { return m_keyPath; }
-    virtual bool unique() { return m_unique; }
-    virtual bool multiEntry() { return m_multiEntry; }
 
     virtual void openCursor(PassRefPtr<IDBKeyRange>, unsigned short direction, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&);
     virtual void count(PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&);
@@ -76,6 +72,11 @@ public:
     virtual void get(PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&);
     virtual void getKey(PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&);
 
+    const String& name() { return m_name; }
+    const IDBKeyPath& keyPath() { return m_keyPath; }
+    const bool& unique() { return m_unique; }
+    const bool& multiEntry() { return m_multiEntry; }
+
 private:
     IDBIndexBackendImpl(const IDBDatabaseBackendImpl*, IDBObjectStoreBackendImpl*, int64_t id, const String& name, const IDBKeyPath&, bool unique, bool multiEntry);
     IDBIndexBackendImpl(const IDBDatabaseBackendImpl*, IDBObjectStoreBackendImpl*, const String& name, const IDBKeyPath&, bool unique, bool multiEntry);
index d35d117..5c0a169 100644 (file)
@@ -46,11 +46,6 @@ class IDBIndexBackendInterface : public ThreadSafeRefCounted<IDBIndexBackendInte
 public:
     virtual ~IDBIndexBackendInterface() { }
 
-    virtual String name() = 0;
-    virtual IDBKeyPath keyPath() = 0;
-    virtual bool unique() = 0;
-    virtual bool multiEntry() = 0;
-
     virtual void openCursor(PassRefPtr<IDBKeyRange>, unsigned short direction, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&) = 0;
     virtual void count(PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&) = 0;
     virtual void openKeyCursor(PassRefPtr<IDBKeyRange>, unsigned short direction, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&) = 0;
index a62dda8..a468654 100644 (file)
@@ -80,15 +80,6 @@ IDBObjectStoreMetadata IDBObjectStoreBackendImpl::metadata() const
     return metadata;
 }
 
-PassRefPtr<DOMStringList> IDBObjectStoreBackendImpl::indexNames() const
-{
-    RefPtr<DOMStringList> indexNames = DOMStringList::create();
-    for (IndexMap::const_iterator it = m_indexes.begin(); it != m_indexes.end(); ++it)
-        indexNames->append(it->first);
-    indexNames->sort();
-    return indexNames.release();
-}
-
 void IDBObjectStoreBackendImpl::get(PassRefPtr<IDBKeyRange> prpKeyRange, PassRefPtr<IDBCallbacks> prpCallbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
 {
     IDB_TRACE("IDBObjectStoreBackendImpl::get");
index 07ab9fc..1e39dda 100644 (file)
@@ -64,10 +64,6 @@ public:
     void setId(int64_t id) { m_id = id; }
 
     virtual IDBObjectStoreMetadata metadata() const;
-    virtual String name() const { return m_name; }
-    virtual IDBKeyPath keyPath() const { return m_keyPath; }
-    virtual PassRefPtr<DOMStringList> indexNames() const;
-    virtual bool autoIncrement() const { return m_autoIncrement; }
 
     virtual void get(PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&);
     virtual void put(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBKey>, PutMode, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&);
@@ -83,6 +79,10 @@ public:
 
     static bool populateIndex(IDBBackingStore&, int64_t databaseId, int64_t objectStoreId, PassRefPtr<IDBIndexBackendImpl>);
 
+    const String& name() { return m_name; }
+    const IDBKeyPath& keyPath() const { return m_keyPath; }
+    const bool& autoIncrement() const { return m_autoIncrement; }
+
 private:
     IDBObjectStoreBackendImpl(const IDBDatabaseBackendImpl*, int64_t databaseId, const String& name, const IDBKeyPath&, bool autoIncrement);
     IDBObjectStoreBackendImpl(const IDBDatabaseBackendImpl*, const String& name, const IDBKeyPath&, bool autoIncrement);
index 6002d9e..07f9f72 100644 (file)
@@ -48,11 +48,6 @@ class IDBObjectStoreBackendInterface : public ThreadSafeRefCounted<IDBObjectStor
 public:
     virtual ~IDBObjectStoreBackendInterface() { }
 
-    virtual String name() const = 0;
-    virtual IDBKeyPath keyPath() const = 0;
-    virtual PassRefPtr<DOMStringList> indexNames() const = 0;
-    virtual bool autoIncrement() const = 0;
-
     virtual void get(PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&) = 0;
 
     enum PutMode {
index 7f9a5e5..e942280 100644 (file)
@@ -1,3 +1,23 @@
+2012-06-25  Joshua Bell  <jsbell@chromium.org>
+
+        IndexedDB: Remove unused backend property accessors
+        https://bugs.webkit.org/show_bug.cgi?id=89893
+
+        Reviewed by Darin Fisher.
+
+        Following the "metadata" API addition in trac.webkit.org/changeset/121059
+        per-property accessors can be removed from the Chromium WebKit API.
+
+        * src/WebIDBDatabaseImpl.cpp: Removed name, version, objectStoreNames.
+        * src/WebIDBDatabaseImpl.h:
+        (WebIDBDatabaseImpl):
+        * src/WebIDBIndexImpl.cpp: Removed name, keyPath, unique, multiEntry.
+        * src/WebIDBIndexImpl.h:
+        (WebIDBIndexImpl):
+        * src/WebIDBObjectStoreImpl.cpp: Removed name, keyPath, autoIncrement, indexNames.
+        * src/WebIDBObjectStoreImpl.h:
+        (WebIDBObjectStoreImpl):
+
 2012-06-25  Ian Vollick  <vollick@chromium.org>
 
         [chromium] Layer chromium should need a redraw after getting its first non-empty bounds.
index 39803e1..18573ca 100644 (file)
@@ -58,21 +58,6 @@ WebIDBMetadata WebIDBDatabaseImpl::metadata() const
     return m_databaseBackend->metadata();
 }
 
-WebString WebIDBDatabaseImpl::name() const
-{
-    return m_databaseBackend->name();
-}
-
-WebString WebIDBDatabaseImpl::version() const
-{
-    return m_databaseBackend->version();
-}
-
-WebDOMStringList WebIDBDatabaseImpl::objectStoreNames() const
-{
-    return m_databaseBackend->objectStoreNames();
-}
-
 WebIDBObjectStore* WebIDBDatabaseImpl::createObjectStore(const WebString& name, const WebIDBKeyPath& keyPath, bool autoIncrement, const WebIDBTransaction& transaction, WebExceptionCode& ec)
 {
     RefPtr<IDBObjectStoreBackendInterface> objectStore = m_databaseBackend->createObjectStore(name, keyPath, autoIncrement, transaction.getIDBTransactionBackendInterface(), ec);
index 5e989e0..4f82518 100644 (file)
@@ -51,9 +51,6 @@ public:
     virtual ~WebIDBDatabaseImpl();
 
     virtual WebIDBMetadata metadata() const;
-    virtual WebString name() const;
-    virtual WebString version() const;
-    virtual WebDOMStringList objectStoreNames() const;
 
     virtual WebIDBObjectStore* createObjectStore(const WebString& name, const WebIDBKeyPath&, bool autoIncrement, const WebIDBTransaction&, WebExceptionCode&);
     virtual void deleteObjectStore(const WebString& name, const WebIDBTransaction&, WebExceptionCode&);
index 7f74e5a..9b1d68c 100644 (file)
@@ -48,26 +48,6 @@ WebIDBIndexImpl::~WebIDBIndexImpl()
 {
 }
 
-WebString WebIDBIndexImpl::name() const
-{
-    return m_backend->name();
-}
-
-WebIDBKeyPath WebIDBIndexImpl::keyPath() const
-{
-    return WebIDBKeyPath(m_backend->keyPath());
-}
-
-bool WebIDBIndexImpl::unique() const
-{
-    return m_backend->unique();
-}
-
-bool WebIDBIndexImpl::multiEntry() const
-{
-    return m_backend->multiEntry();
-}
-
 void WebIDBIndexImpl::openObjectCursor(const WebIDBKeyRange& keyRange, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
 {
     m_backend->openCursor(keyRange, direction, IDBCallbacksProxy::create(adoptPtr(callbacks)), transaction.getIDBTransactionBackendInterface(), ec);
index 04fea58..220962b 100644 (file)
@@ -43,11 +43,6 @@ public:
     WebIDBIndexImpl(WTF::PassRefPtr<WebCore::IDBIndexBackendInterface>);
     virtual ~WebIDBIndexImpl();
 
-    virtual WebString name() const;
-    virtual WebIDBKeyPath keyPath() const;
-    virtual bool unique() const;
-    virtual bool multiEntry() const;
-
     virtual void openObjectCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&); 
     virtual void openKeyCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
     virtual void count(const WebIDBKeyRange&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
index 4c45be2..9bac6d3 100755 (executable)
@@ -53,26 +53,6 @@ WebIDBObjectStoreImpl::~WebIDBObjectStoreImpl()
 {
 }
 
-WebString WebIDBObjectStoreImpl::name() const
-{
-    return m_objectStore->name();
-}
-
-WebIDBKeyPath WebIDBObjectStoreImpl::keyPath() const
-{
-    return m_objectStore->keyPath();
-}
-
-WebDOMStringList WebIDBObjectStoreImpl::indexNames() const
-{
-    return m_objectStore->indexNames();
-}
-
-bool WebIDBObjectStoreImpl::autoIncrement() const
-{
-    return m_objectStore->autoIncrement();
-}
-
 void WebIDBObjectStoreImpl::get(const WebIDBKeyRange& keyRange, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
 {
     m_objectStore->get(keyRange, IDBCallbacksProxy::create(adoptPtr(callbacks)), transaction.getIDBTransactionBackendInterface(), ec);
index 1bffd56..5a881b5 100644 (file)
@@ -45,11 +45,6 @@ public:
     WebIDBObjectStoreImpl(WTF::PassRefPtr<WebCore::IDBObjectStoreBackendInterface>);
     ~WebIDBObjectStoreImpl();
 
-    WebString name() const;
-    WebIDBKeyPath keyPath() const;
-    WebDOMStringList indexNames() const;
-    bool autoIncrement() const;
-
     void get(const WebIDBKeyRange&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
     void put(const WebSerializedScriptValue&, const WebIDBKey&, PutMode, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
     void deleteFunction(const WebIDBKeyRange&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);