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

Unified Diff: Source/modules/indexeddb/IDBTransaction.cpp

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 | « Source/modules/indexeddb/IDBTransaction.h ('k') | Source/modules/indexeddb/IDBTransactionTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/indexeddb/IDBTransaction.cpp
diff --git a/Source/modules/indexeddb/IDBTransaction.cpp b/Source/modules/indexeddb/IDBTransaction.cpp
index 58290892ca6f6cc627a97080e41595a672988c4c..2f8ee47fc7c5e7ab304d13f45c7fdc3e3b4eefde 100644
--- a/Source/modules/indexeddb/IDBTransaction.cpp
+++ b/Source/modules/indexeddb/IDBTransaction.cpp
@@ -43,7 +43,7 @@ using blink::WebIDBDatabase;
namespace WebCore {
-IDBTransaction* IDBTransaction::create(ExecutionContext* context, int64_t id, const Vector<String>& objectStoreNames, WebIDBDatabase::TransactionMode mode, IDBDatabase* db)
+IDBTransaction* IDBTransaction::create(ExecutionContext* context, int64_t id, const Vector<String>& objectStoreNames, blink::WebIDBTransactionMode mode, IDBDatabase* db)
{
IDBOpenDBRequest* openDBRequest = 0;
IDBTransaction* transaction = adoptRefCountedGarbageCollectedWillBeNoop(new IDBTransaction(context, id, objectStoreNames, mode, db, openDBRequest, IDBDatabaseMetadata()));
@@ -53,7 +53,7 @@ IDBTransaction* IDBTransaction::create(ExecutionContext* context, int64_t id, co
IDBTransaction* IDBTransaction::create(ExecutionContext* context, int64_t id, IDBDatabase* db, IDBOpenDBRequest* openDBRequest, const IDBDatabaseMetadata& previousMetadata)
{
- IDBTransaction* transaction = adoptRefCountedGarbageCollectedWillBeNoop(new IDBTransaction(context, id, Vector<String>(), WebIDBDatabase::TransactionVersionChange, db, openDBRequest, previousMetadata));
+ IDBTransaction* transaction = adoptRefCountedGarbageCollectedWillBeNoop(new IDBTransaction(context, id, Vector<String>(), blink::WebIDBTransactionModeVersionChange, db, openDBRequest, previousMetadata));
transaction->suspendIfNeeded();
return transaction;
}
@@ -76,7 +76,7 @@ const AtomicString& IDBTransaction::modeVersionChange()
return versionchange;
}
-IDBTransaction::IDBTransaction(ExecutionContext* context, int64_t id, const Vector<String>& objectStoreNames, WebIDBDatabase::TransactionMode mode, IDBDatabase* db, IDBOpenDBRequest* openDBRequest, const IDBDatabaseMetadata& previousMetadata)
+IDBTransaction::IDBTransaction(ExecutionContext* context, int64_t id, const Vector<String>& objectStoreNames, blink::WebIDBTransactionMode mode, IDBDatabase* db, IDBOpenDBRequest* openDBRequest, const IDBDatabaseMetadata& previousMetadata)
: ActiveDOMObject(context)
, m_id(id)
, m_database(db)
@@ -89,7 +89,7 @@ IDBTransaction::IDBTransaction(ExecutionContext* context, int64_t id, const Vect
, m_previousMetadata(previousMetadata)
{
ScriptWrappable::init(this);
- if (mode == WebIDBDatabase::TransactionVersionChange) {
+ if (mode == blink::WebIDBTransactionModeVersionChange) {
// Not active until the callback.
m_state = Inactive;
}
@@ -299,30 +299,30 @@ bool IDBTransaction::hasPendingActivity() const
return m_hasPendingActivity && !m_contextStopped;
}
-WebIDBDatabase::TransactionMode IDBTransaction::stringToMode(const String& modeString, ExceptionState& exceptionState)
+blink::WebIDBTransactionMode IDBTransaction::stringToMode(const String& modeString, ExceptionState& exceptionState)
{
if (modeString.isNull()
|| modeString == IDBTransaction::modeReadOnly())
- return WebIDBDatabase::TransactionReadOnly;
+ return blink::WebIDBTransactionModeReadOnly;
if (modeString == IDBTransaction::modeReadWrite())
- return WebIDBDatabase::TransactionReadWrite;
+ return blink::WebIDBTransactionModeReadWrite;
exceptionState.throwTypeError("The mode provided ('" + modeString + "') is not one of 'readonly' or 'readwrite'.");
- return WebIDBDatabase::TransactionReadOnly;
+ return blink::WebIDBTransactionModeReadOnly;
}
-const AtomicString& IDBTransaction::modeToString(WebIDBDatabase::TransactionMode mode)
+const AtomicString& IDBTransaction::modeToString(blink::WebIDBTransactionMode mode)
{
switch (mode) {
- case WebIDBDatabase::TransactionReadOnly:
+ case blink::WebIDBTransactionModeReadOnly:
return IDBTransaction::modeReadOnly();
break;
- case WebIDBDatabase::TransactionReadWrite:
+ case blink::WebIDBTransactionModeReadWrite:
return IDBTransaction::modeReadWrite();
break;
- case WebIDBDatabase::TransactionVersionChange:
+ case blink::WebIDBTransactionModeVersionChange:
return IDBTransaction::modeVersionChange();
break;
}
« no previous file with comments | « Source/modules/indexeddb/IDBTransaction.h ('k') | Source/modules/indexeddb/IDBTransactionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698