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

Unified Diff: public/platform/WebIDBDatabase.h

Issue 325683002: [IndexedDB] Use consistent enums on both sides of IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Incorporated review comments as build bot was failing with previous patch. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « public/platform/WebIDBCursor.h ('k') | public/platform/WebIDBTypes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebIDBDatabase.h
diff --git a/public/platform/WebIDBDatabase.h b/public/platform/WebIDBDatabase.h
index bc63db4bb584f893dda11ee3b6fee40e2a4d4c02..61f3ae14f6b5ae83680deb7be6955beaf6912040 100644
--- a/public/platform/WebIDBDatabase.h
+++ b/public/platform/WebIDBDatabase.h
@@ -30,6 +30,7 @@
#include "WebCommon.h"
#include "WebIDBCursor.h"
#include "WebIDBMetadata.h"
+#include "public/platform/WebIDBTypes.h"
namespace blink {
@@ -46,15 +47,15 @@ class WebIDBDatabase {
public:
virtual ~WebIDBDatabase() { }
- enum TransactionMode {
- TransactionReadOnly = 0,
- TransactionReadWrite,
- TransactionVersionChange,
- };
+ // FIXME: Remove once Chromium is updated to use the new enums.
+ typedef WebIDBTransactionMode TransactionMode;
+ static const WebIDBTransactionMode TransactionReadOnly = WebIDBTransactionModeReadOnly;
+ static const WebIDBTransactionMode TransactionReadWrite = WebIDBTransactionModeReadWrite;
+ static const WebIDBTransactionMode TransactionVersionChange = WebIDBTransactionModeVersionChange;
virtual void createObjectStore(long long transactionId, long long objectStoreId, const WebString& name, const WebIDBKeyPath&, bool autoIncrement) { BLINK_ASSERT_NOT_REACHED(); }
virtual void deleteObjectStore(long long transactionId, long long objectStoreId) { BLINK_ASSERT_NOT_REACHED(); }
- virtual void createTransaction(long long id, WebIDBDatabaseCallbacks*, const WebVector<long long>& scope, TransactionMode) { BLINK_ASSERT_NOT_REACHED(); }
+ virtual void createTransaction(long long id, WebIDBDatabaseCallbacks*, const WebVector<long long>& scope, blink::WebIDBTransactionMode) { BLINK_ASSERT_NOT_REACHED(); }
virtual void close() { BLINK_ASSERT_NOT_REACHED(); }
virtual void forceClose() { BLINK_ASSERT_NOT_REACHED(); }
@@ -64,28 +65,28 @@ public:
virtual void createIndex(long long transactionId, long long objectStoreId, long long indexId, const WebString& name, const WebIDBKeyPath&, bool unique, bool multiEntry) { BLINK_ASSERT_NOT_REACHED(); }
virtual void deleteIndex(long long transactionId, long long objectStoreId, long long indexId) { BLINK_ASSERT_NOT_REACHED(); }
- enum TaskType {
- NormalTask = 0,
- PreemptiveTask,
- TaskTypeLast = PreemptiveTask
- };
+ // FIXME: Remove once Chromium is updated to use the new enums.
+ typedef WebIDBTaskType TaskType;
+ static const WebIDBTaskType NormalTask = WebIDBTaskTypeNormal;
+ static const WebIDBTaskType PreemptiveTask = WebIDBTaskTypePreemptive;
+ static const WebIDBTaskType TaskTypeLast = WebIDBTaskTypeLast;
- enum PutMode {
- AddOrUpdate,
- AddOnly,
- CursorUpdate,
- PutModeLast = CursorUpdate
- };
+ // FIXME: Remove once Chromium is updated to use the new enums.
+ typedef WebIDBPutMode PutMode;
+ static const WebIDBPutMode AddOrUpdate = WebIDBPutModeAddOrUpdate;
+ static const WebIDBPutMode AddOnly = WebIDBPutModeAddOnly;
+ static const WebIDBPutMode CursorUpdate = WebIDBPutModeCursorUpdate;
+ static const WebIDBPutMode PutModeLast = WebIDBPutModeLast;
static const long long minimumIndexId = 30;
typedef WebVector<WebIDBKey> WebIndexKeys;
virtual void get(long long transactionId, long long objectStoreId, long long indexId, const WebIDBKeyRange&, bool keyOnly, WebIDBCallbacks*) { BLINK_ASSERT_NOT_REACHED(); }
- virtual void put(long long transactionId, long long objectStoreId, const WebData& value, const WebVector<WebBlobInfo>&, const WebIDBKey&, PutMode, WebIDBCallbacks*, const WebVector<long long>& indexIds, const WebVector<WebIndexKeys>&) { BLINK_ASSERT_NOT_REACHED(); }
+ virtual void put(long long transactionId, long long objectStoreId, const WebData& value, const WebVector<WebBlobInfo>&, const WebIDBKey&, blink::WebIDBPutMode, WebIDBCallbacks*, const WebVector<long long>& indexIds, const WebVector<WebIndexKeys>&) { BLINK_ASSERT_NOT_REACHED(); }
virtual void setIndexKeys(long long transactionId, long long objectStoreId, const WebIDBKey&, const WebVector<long long>& indexIds, const WebVector<WebIndexKeys>&) { BLINK_ASSERT_NOT_REACHED(); }
virtual void setIndexesReady(long long transactionId, long long objectStoreId, const WebVector<long long>& indexIds) { BLINK_ASSERT_NOT_REACHED(); }
- virtual void openCursor(long long transactionId, long long objectStoreId, long long indexId, const WebIDBKeyRange&, WebIDBCursor::Direction, bool keyOnly, TaskType, WebIDBCallbacks*) { BLINK_ASSERT_NOT_REACHED(); }
+ virtual void openCursor(long long transactionId, long long objectStoreId, long long indexId, const WebIDBKeyRange&, blink::WebIDBCursorDirection, bool keyOnly, blink::WebIDBTaskType, WebIDBCallbacks*) { BLINK_ASSERT_NOT_REACHED(); }
virtual void count(long long transactionId, long long objectStoreId, long long indexId, const WebIDBKeyRange&, WebIDBCallbacks*) { BLINK_ASSERT_NOT_REACHED(); }
virtual void deleteRange(long long transactionId, long long objectStoreId, const WebIDBKeyRange&, WebIDBCallbacks*) { BLINK_ASSERT_NOT_REACHED(); }
virtual void clear(long long transactionId, long long objectStoreId, WebIDBCallbacks*) { BLINK_ASSERT_NOT_REACHED(); }
« no previous file with comments | « public/platform/WebIDBCursor.h ('k') | public/platform/WebIDBTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698