| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 14 matching lines...) Expand all Loading... |
| 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 */ | 30 */ |
| 31 | 31 |
| 32 #include "config.h" | 32 #include "config.h" |
| 33 #include "SQLTransactionSync.h" | 33 #include "SQLTransactionSync.h" |
| 34 | 34 |
| 35 #if ENABLE(SQL_DATABASE) | |
| 36 | |
| 37 #include "DatabaseSync.h" | 35 #include "DatabaseSync.h" |
| 38 #include "SQLTransactionSyncCallback.h" | 36 #include "SQLTransactionSyncCallback.h" |
| 39 #include "ScriptExecutionContext.h" | 37 #include "ScriptExecutionContext.h" |
| 40 | 38 |
| 41 namespace WebCore { | 39 namespace WebCore { |
| 42 | 40 |
| 43 PassRefPtr<SQLTransactionSync> SQLTransactionSync::create(DatabaseSync* db, Pass
RefPtr<SQLTransactionSyncCallback> callback, bool readOnly) | 41 PassRefPtr<SQLTransactionSync> SQLTransactionSync::create(DatabaseSync* db, Pass
RefPtr<SQLTransactionSyncCallback> callback, bool readOnly) |
| 44 { | 42 { |
| 45 return adoptRef(new SQLTransactionSync(db, callback, readOnly)); | 43 return adoptRef(new SQLTransactionSync(db, callback, readOnly)); |
| 46 } | 44 } |
| 47 | 45 |
| 48 SQLTransactionSync::SQLTransactionSync(DatabaseSync* db, PassRefPtr<SQLTransacti
onSyncCallback> callback, bool readOnly) | 46 SQLTransactionSync::SQLTransactionSync(DatabaseSync* db, PassRefPtr<SQLTransacti
onSyncCallback> callback, bool readOnly) |
| 49 : SQLTransactionBackendSync(db, callback, readOnly) | 47 : SQLTransactionBackendSync(db, callback, readOnly) |
| 50 { | 48 { |
| 51 ASSERT(m_database->scriptExecutionContext()->isContextThread()); | 49 ASSERT(m_database->scriptExecutionContext()->isContextThread()); |
| 52 } | 50 } |
| 53 | 51 |
| 54 SQLTransactionSync* SQLTransactionSync::from(SQLTransactionBackendSync* backend) | 52 SQLTransactionSync* SQLTransactionSync::from(SQLTransactionBackendSync* backend) |
| 55 { | 53 { |
| 56 return static_cast<SQLTransactionSync*>(backend); | 54 return static_cast<SQLTransactionSync*>(backend); |
| 57 } | 55 } |
| 58 | 56 |
| 59 } // namespace WebCore | 57 } // namespace WebCore |
| 60 | |
| 61 #endif // ENABLE(SQL_DATABASE) | |
| OLD | NEW |