| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  * Copyright (C) 2007 Apple Inc. All rights reserved. |    2  * Copyright (C) 2007 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   48 class SQLTransactionCallback; |   48 class SQLTransactionCallback; | 
|   49 class SQLTransactionErrorCallback; |   49 class SQLTransactionErrorCallback; | 
|   50 class SQLValue; |   50 class SQLValue; | 
|   51 class VoidCallback; |   51 class VoidCallback; | 
|   52  |   52  | 
|   53 class SQLTransactionWrapper : public ThreadSafeRefCounted<SQLTransactionWrapper>
      { |   53 class SQLTransactionWrapper : public ThreadSafeRefCounted<SQLTransactionWrapper>
      { | 
|   54 public: |   54 public: | 
|   55     virtual ~SQLTransactionWrapper() { } |   55     virtual ~SQLTransactionWrapper() { } | 
|   56     virtual bool performPreflight(SQLTransaction*) = 0; |   56     virtual bool performPreflight(SQLTransaction*) = 0; | 
|   57     virtual bool performPostflight(SQLTransaction*) = 0; |   57     virtual bool performPostflight(SQLTransaction*) = 0; | 
|   58  |  | 
|   59     virtual SQLError* sqlError() const = 0; |   58     virtual SQLError* sqlError() const = 0; | 
 |   59     virtual void handleCommitFailedAfterPostflight(SQLTransaction*) = 0; | 
|   60 }; |   60 }; | 
|   61  |   61  | 
|   62 class SQLTransaction : public ThreadSafeRefCounted<SQLTransaction> { |   62 class SQLTransaction : public ThreadSafeRefCounted<SQLTransaction> { | 
|   63 public: |   63 public: | 
|   64     static PassRefPtr<SQLTransaction> create(Database*, PassRefPtr<SQLTransactio
     nCallback>, PassRefPtr<SQLTransactionErrorCallback>, |   64     static PassRefPtr<SQLTransaction> create(Database*, PassRefPtr<SQLTransactio
     nCallback>, PassRefPtr<SQLTransactionErrorCallback>, | 
|   65                                              PassRefPtr<VoidCallback>, PassRefPt
     r<SQLTransactionWrapper>, bool readOnly = false); |   65                                              PassRefPtr<VoidCallback>, PassRefPt
     r<SQLTransactionWrapper>, bool readOnly = false); | 
|   66  |   66  | 
|   67     ~SQLTransaction(); |   67     ~SQLTransaction(); | 
|   68  |   68  | 
|   69     void executeSQL(const String& sqlStatement, const Vector<SQLValue>& argument
     s, |   69     void executeSQL(const String& sqlStatement, const Vector<SQLValue>& argument
     s, | 
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  116     RefPtr<Database> m_database; |  116     RefPtr<Database> m_database; | 
|  117     RefPtr<SQLTransactionWrapper> m_wrapper; |  117     RefPtr<SQLTransactionWrapper> m_wrapper; | 
|  118     SQLCallbackWrapper<SQLTransactionCallback> m_callbackWrapper; |  118     SQLCallbackWrapper<SQLTransactionCallback> m_callbackWrapper; | 
|  119     SQLCallbackWrapper<VoidCallback> m_successCallbackWrapper; |  119     SQLCallbackWrapper<VoidCallback> m_successCallbackWrapper; | 
|  120     SQLCallbackWrapper<SQLTransactionErrorCallback> m_errorCallbackWrapper; |  120     SQLCallbackWrapper<SQLTransactionErrorCallback> m_errorCallbackWrapper; | 
|  121     RefPtr<SQLError> m_transactionError; |  121     RefPtr<SQLError> m_transactionError; | 
|  122     bool m_shouldRetryCurrentStatement; |  122     bool m_shouldRetryCurrentStatement; | 
|  123     bool m_modifiedDatabase; |  123     bool m_modifiedDatabase; | 
|  124     bool m_lockAcquired; |  124     bool m_lockAcquired; | 
|  125     bool m_readOnly; |  125     bool m_readOnly; | 
 |  126     bool m_hasVersionMismatch; | 
|  126  |  127  | 
|  127     Mutex m_statementMutex; |  128     Mutex m_statementMutex; | 
|  128     Deque<RefPtr<SQLStatement> > m_statementQueue; |  129     Deque<RefPtr<SQLStatement> > m_statementQueue; | 
|  129  |  130  | 
|  130     OwnPtr<SQLiteTransaction> m_sqliteTransaction; |  131     OwnPtr<SQLiteTransaction> m_sqliteTransaction; | 
|  131 }; |  132 }; | 
|  132  |  133  | 
|  133 } // namespace WebCore |  134 } // namespace WebCore | 
|  134  |  135  | 
|  135 #endif |  136 #endif | 
|  136  |  137  | 
|  137 #endif // SQLTransaction_h |  138 #endif // SQLTransaction_h | 
| OLD | NEW |