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

Unified Diff: content/browser/indexed_db/indexed_db_transaction_coordinator.cc

Issue 320833002: [IndexedDB] Use consistent enums on both sides of IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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: content/browser/indexed_db/indexed_db_transaction_coordinator.cc
diff --git a/content/browser/indexed_db/indexed_db_transaction_coordinator.cc b/content/browser/indexed_db/indexed_db_transaction_coordinator.cc
index a1eaad41ecd6dcef41137f33d497d33520d01f5d..10a293d62649b52b6c1447d03c65794bc4c9042c 100644
--- a/content/browser/indexed_db/indexed_db_transaction_coordinator.cc
+++ b/content/browser/indexed_db/indexed_db_transaction_coordinator.cc
@@ -44,7 +44,7 @@ bool IndexedDBTransactionCoordinator::IsRunningVersionChangeTransaction()
const {
return !started_transactions_.empty() &&
(*started_transactions_.begin())->mode() ==
- indexed_db::TRANSACTION_VERSION_CHANGE;
+ blink::TransactionVersionChange;
}
#ifndef NDEBUG
@@ -97,7 +97,7 @@ void IndexedDBTransactionCoordinator::ProcessQueuedTransactions() {
it != started_transactions_.end();
++it) {
IndexedDBTransaction* transaction = *it;
- if (transaction->mode() == indexed_db::TRANSACTION_READ_WRITE) {
+ if (transaction->mode() == blink::TransactionReadWrite) {
// Started read/write transactions have exclusive access to the object
// stores within their scopes.
locked_scope.insert(transaction->scope().begin(),
@@ -116,7 +116,7 @@ void IndexedDBTransactionCoordinator::ProcessQueuedTransactions() {
transaction->Start();
DCHECK_EQ(IndexedDBTransaction::STARTED, transaction->state());
}
- if (transaction->mode() == indexed_db::TRANSACTION_READ_WRITE) {
+ if (transaction->mode() == blink::TransactionReadWrite) {
// Either the transaction started, so it has exclusive access to the
// stores in its scope, or per the spec the transaction which was
// created first must get access first, so the stores are also locked.
@@ -147,16 +147,16 @@ bool IndexedDBTransactionCoordinator::CanStartTransaction(
const std::set<int64>& locked_scope) const {
DCHECK(queued_transactions_.count(transaction));
switch (transaction->mode()) {
- case indexed_db::TRANSACTION_VERSION_CHANGE:
+ case blink::TransactionVersionChange:
DCHECK_EQ(1u, queued_transactions_.size());
DCHECK(started_transactions_.empty());
DCHECK(locked_scope.empty());
return true;
- case indexed_db::TRANSACTION_READ_ONLY:
+ case blink::TransactionReadOnly:
return true;
- case indexed_db::TRANSACTION_READ_WRITE:
+ case blink::TransactionReadWrite:
return !DoSetsIntersect(transaction->scope(), locked_scope);
}
NOTREACHED();

Powered by Google App Engine
This is Rietveld 408576698