| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 public: | 47 public: |
| 48 SQLTransactionCoordinator(); | 48 SQLTransactionCoordinator(); |
| 49 DECLARE_TRACE(); | 49 DECLARE_TRACE(); |
| 50 void acquireLock(SQLTransactionBackend*); | 50 void acquireLock(SQLTransactionBackend*); |
| 51 void releaseLock(SQLTransactionBackend*); | 51 void releaseLock(SQLTransactionBackend*); |
| 52 void shutdown(); | 52 void shutdown(); |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 typedef HeapDeque<Member<SQLTransactionBackend>> TransactionsQueue; | 55 typedef HeapDeque<Member<SQLTransactionBackend>> TransactionsQueue; |
| 56 struct CoordinationInfo { | 56 struct CoordinationInfo { |
| 57 ALLOW_ONLY_INLINE_ALLOCATION(); | 57 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 58 public: | 58 public: |
| 59 TransactionsQueue pendingTransactions; | 59 TransactionsQueue pendingTransactions; |
| 60 HeapHashSet<Member<SQLTransactionBackend>> activeReadTransactions; | 60 HeapHashSet<Member<SQLTransactionBackend>> activeReadTransactions; |
| 61 Member<SQLTransactionBackend> activeWriteTransaction; | 61 Member<SQLTransactionBackend> activeWriteTransaction; |
| 62 | 62 |
| 63 DEFINE_INLINE_TRACE() | 63 DEFINE_INLINE_TRACE() |
| 64 { | 64 { |
| 65 visitor->trace(pendingTransactions); | 65 visitor->trace(pendingTransactions); |
| 66 visitor->trace(activeReadTransactions); | 66 visitor->trace(activeReadTransactions); |
| 67 visitor->trace(activeWriteTransaction); | 67 visitor->trace(activeWriteTransaction); |
| 68 } | 68 } |
| 69 }; | 69 }; |
| 70 // Maps database names to information about pending transactions | 70 // Maps database names to information about pending transactions |
| 71 typedef HeapHashMap<String, CoordinationInfo> CoordinationInfoHeapMap; | 71 typedef HeapHashMap<String, CoordinationInfo> CoordinationInfoHeapMap; |
| 72 CoordinationInfoHeapMap m_coordinationInfoMap; | 72 CoordinationInfoHeapMap m_coordinationInfoMap; |
| 73 bool m_isShuttingDown; | 73 bool m_isShuttingDown; |
| 74 | 74 |
| 75 void processPendingTransactions(CoordinationInfo&); | 75 void processPendingTransactions(CoordinationInfo&); |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 } // namespace blink | 78 } // namespace blink |
| 79 | 79 |
| 80 #endif // SQLTransactionCoordinator_h | 80 #endif // SQLTransactionCoordinator_h |
| OLD | NEW |