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

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: 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
Index: Source/modules/indexeddb/IDBTransaction.cpp
diff --git a/Source/modules/indexeddb/IDBTransaction.cpp b/Source/modules/indexeddb/IDBTransaction.cpp
index 3291016143dd89e3a70bba9d0c797442e69f25e0..b5d80f2f0c10868f75c6dfbba4cab07fbe8d27cf 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::TransactionMode mode, IDBDatabase* db)
{
IDBOpenDBRequest* openDBRequest = 0;
IDBTransaction* transaction = adoptRefCountedGarbageCollected(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 = adoptRefCountedGarbageCollected(new IDBTransaction(context, id, Vector<String>(), WebIDBDatabase::TransactionVersionChange, db, openDBRequest, previousMetadata));
+ IDBTransaction* transaction = adoptRefCountedGarbageCollected(new IDBTransaction(context, id, Vector<String>(), blink::TransactionVersionChange, 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::TransactionMode 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::TransactionVersionChange) {
// 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::TransactionMode IDBTransaction::stringToMode(const String& modeString, ExceptionState& exceptionState)
{
if (modeString.isNull()
|| modeString == IDBTransaction::modeReadOnly())
- return WebIDBDatabase::TransactionReadOnly;
+ return blink::TransactionReadOnly;
if (modeString == IDBTransaction::modeReadWrite())
- return WebIDBDatabase::TransactionReadWrite;
+ return blink::TransactionReadWrite;
exceptionState.throwTypeError("The mode provided ('" + modeString + "') is not one of 'readonly' or 'readwrite'.");
- return WebIDBDatabase::TransactionReadOnly;
+ return blink::TransactionReadOnly;
}
-const AtomicString& IDBTransaction::modeToString(WebIDBDatabase::TransactionMode mode)
+const AtomicString& IDBTransaction::modeToString(blink::TransactionMode mode)
{
switch (mode) {
- case WebIDBDatabase::TransactionReadOnly:
+ case blink::TransactionReadOnly:
return IDBTransaction::modeReadOnly();
break;
- case WebIDBDatabase::TransactionReadWrite:
+ case blink::TransactionReadWrite:
return IDBTransaction::modeReadWrite();
break;
- case WebIDBDatabase::TransactionVersionChange:
+ case blink::TransactionVersionChange:
return IDBTransaction::modeVersionChange();
break;
}

Powered by Google App Engine
This is Rietveld 408576698