| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2013 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 class SQLTransactionWrapper : public ThreadSafeRefCounted<SQLTransactionWrapper>
{ | 50 class SQLTransactionWrapper : public ThreadSafeRefCounted<SQLTransactionWrapper>
{ |
| 51 public: | 51 public: |
| 52 virtual ~SQLTransactionWrapper() { } | 52 virtual ~SQLTransactionWrapper() { } |
| 53 virtual bool performPreflight(SQLTransactionBackend*) = 0; | 53 virtual bool performPreflight(SQLTransactionBackend*) = 0; |
| 54 virtual bool performPostflight(SQLTransactionBackend*) = 0; | 54 virtual bool performPostflight(SQLTransactionBackend*) = 0; |
| 55 virtual SQLError* sqlError() const = 0; | 55 virtual SQLError* sqlError() const = 0; |
| 56 virtual void handleCommitFailedAfterPostflight(SQLTransactionBackend*) = 0; | 56 virtual void handleCommitFailedAfterPostflight(SQLTransactionBackend*) = 0; |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 class SQLTransactionBackend : public SQLTransactionStateMachine<SQLTransactionBa
ckend>, public AbstractSQLTransactionBackend { | 59 class SQLTransactionBackend FINAL : public SQLTransactionStateMachine<SQLTransac
tionBackend>, public AbstractSQLTransactionBackend { |
| 60 public: | 60 public: |
| 61 static PassRefPtr<SQLTransactionBackend> create(DatabaseBackend*, | 61 static PassRefPtr<SQLTransactionBackend> create(DatabaseBackend*, |
| 62 PassRefPtr<AbstractSQLTransaction>, PassRefPtr<SQLTransactionWrapper>, b
ool readOnly); | 62 PassRefPtr<AbstractSQLTransaction>, PassRefPtr<SQLTransactionWrapper>, b
ool readOnly); |
| 63 | 63 |
| 64 virtual ~SQLTransactionBackend(); | 64 virtual ~SQLTransactionBackend(); |
| 65 | 65 |
| 66 void lockAcquired(); | 66 void lockAcquired(); |
| 67 void performNextStep(); | 67 void performNextStep(); |
| 68 | 68 |
| 69 DatabaseBackend* database() { return m_database.get(); } | 69 DatabaseBackend* database() { return m_database.get(); } |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 125 |
| 126 Mutex m_statementMutex; | 126 Mutex m_statementMutex; |
| 127 Deque<RefPtr<SQLStatementBackend> > m_statementQueue; | 127 Deque<RefPtr<SQLStatementBackend> > m_statementQueue; |
| 128 | 128 |
| 129 OwnPtr<SQLiteTransaction> m_sqliteTransaction; | 129 OwnPtr<SQLiteTransaction> m_sqliteTransaction; |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 } // namespace WebCore | 132 } // namespace WebCore |
| 133 | 133 |
| 134 #endif // SQLTransactionBackend_h | 134 #endif // SQLTransactionBackend_h |
| OLD | NEW |