OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/indexed_db/indexed_db_transaction_coordinator.h" | 5 #include "content/browser/indexed_db/indexed_db_transaction_coordinator.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "content/browser/indexed_db/indexed_db_transaction.h" | 8 #include "content/browser/indexed_db/indexed_db_transaction.h" |
9 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h" | 9 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 | 12 |
13 IndexedDBTransactionCoordinator::IndexedDBTransactionCoordinator() {} | 13 IndexedDBTransactionCoordinator::IndexedDBTransactionCoordinator() {} |
14 | 14 |
15 IndexedDBTransactionCoordinator::~IndexedDBTransactionCoordinator() { | 15 IndexedDBTransactionCoordinator::~IndexedDBTransactionCoordinator() { |
16 DCHECK(!queued_transactions_.size()); | 16 DCHECK(queued_transactions_.empty()); |
17 DCHECK(!started_transactions_.size()); | 17 DCHECK(started_transactions_.empty()); |
18 } | 18 } |
19 | 19 |
20 void IndexedDBTransactionCoordinator::DidCreateTransaction( | 20 void IndexedDBTransactionCoordinator::DidCreateTransaction( |
21 scoped_refptr<IndexedDBTransaction> transaction) { | 21 scoped_refptr<IndexedDBTransaction> transaction) { |
22 DCHECK(!queued_transactions_.count(transaction)); | 22 DCHECK(!queued_transactions_.count(transaction)); |
23 DCHECK(!started_transactions_.count(transaction)); | 23 DCHECK(!started_transactions_.count(transaction)); |
24 DCHECK_EQ(IndexedDBTransaction::CREATED, transaction->state()); | 24 DCHECK_EQ(IndexedDBTransaction::CREATED, transaction->state()); |
25 | 25 |
26 queued_transactions_.insert(transaction); | 26 queued_transactions_.insert(transaction); |
27 ProcessQueuedTransactions(); | 27 ProcessQueuedTransactions(); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 146 |
147 case blink::WebIDBTransactionModeReadOnly: | 147 case blink::WebIDBTransactionModeReadOnly: |
148 case blink::WebIDBTransactionModeReadWrite: | 148 case blink::WebIDBTransactionModeReadWrite: |
149 return !DoSetsIntersect(transaction->scope(), locked_scope); | 149 return !DoSetsIntersect(transaction->scope(), locked_scope); |
150 } | 150 } |
151 NOTREACHED(); | 151 NOTREACHED(); |
152 return false; | 152 return false; |
153 } | 153 } |
154 | 154 |
155 } // namespace content | 155 } // namespace content |
OLD | NEW |