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/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "content/browser/indexed_db/indexed_db_transaction.h" | 9 #include "content/browser/indexed_db/indexed_db_transaction.h" |
10 #include "third_party/WebKit/public/platform/WebIDBTypes.h" | 10 #include "third_party/WebKit/public/platform/WebIDBTypes.h" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 const std::set<int64>& locked_scope) const { | 139 const std::set<int64>& locked_scope) const { |
140 DCHECK(queued_transactions_.count(transaction)); | 140 DCHECK(queued_transactions_.count(transaction)); |
141 switch (transaction->mode()) { | 141 switch (transaction->mode()) { |
142 case blink::WebIDBTransactionModeVersionChange: | 142 case blink::WebIDBTransactionModeVersionChange: |
143 DCHECK_EQ(1u, queued_transactions_.size()); | 143 DCHECK_EQ(1u, queued_transactions_.size()); |
144 DCHECK(started_transactions_.empty()); | 144 DCHECK(started_transactions_.empty()); |
145 DCHECK(locked_scope.empty()); | 145 DCHECK(locked_scope.empty()); |
146 return true; | 146 return true; |
147 | 147 |
148 case blink::WebIDBTransactionModeReadOnly: | 148 case blink::WebIDBTransactionModeReadOnly: |
149 return true; | |
150 | |
151 case blink::WebIDBTransactionModeReadWrite: | 149 case blink::WebIDBTransactionModeReadWrite: |
152 return !DoSetsIntersect(transaction->scope(), locked_scope); | 150 return !DoSetsIntersect(transaction->scope(), locked_scope); |
153 } | 151 } |
154 NOTREACHED(); | 152 NOTREACHED(); |
155 return false; | 153 return false; |
156 } | 154 } |
157 | 155 |
158 } // namespace content | 156 } // namespace content |
OLD | NEW |