OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 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 10 matching lines...) Expand all Loading... |
21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 */ | 27 */ |
28 | 28 |
29 #include "modules/webdatabase/SQLTransactionBackend.h" | 29 #include "modules/webdatabase/SQLTransactionBackend.h" |
30 | 30 |
| 31 #include <memory> |
31 #include "modules/webdatabase/Database.h" | 32 #include "modules/webdatabase/Database.h" |
32 #include "modules/webdatabase/DatabaseAuthorizer.h" | 33 #include "modules/webdatabase/DatabaseAuthorizer.h" |
33 #include "modules/webdatabase/DatabaseContext.h" | 34 #include "modules/webdatabase/DatabaseContext.h" |
34 #include "modules/webdatabase/DatabaseThread.h" | 35 #include "modules/webdatabase/DatabaseThread.h" |
35 #include "modules/webdatabase/DatabaseTracker.h" | 36 #include "modules/webdatabase/DatabaseTracker.h" |
36 #include "modules/webdatabase/SQLError.h" | 37 #include "modules/webdatabase/SQLError.h" |
37 #include "modules/webdatabase/SQLStatementBackend.h" | 38 #include "modules/webdatabase/SQLStatementBackend.h" |
38 #include "modules/webdatabase/SQLTransaction.h" | 39 #include "modules/webdatabase/SQLTransaction.h" |
39 #include "modules/webdatabase/SQLTransactionClient.h" | 40 #include "modules/webdatabase/SQLTransactionClient.h" |
40 #include "modules/webdatabase/SQLTransactionCoordinator.h" | 41 #include "modules/webdatabase/SQLTransactionCoordinator.h" |
41 #include "modules/webdatabase/StorageLog.h" | 42 #include "modules/webdatabase/StorageLog.h" |
42 #include "modules/webdatabase/sqlite/SQLValue.h" | 43 #include "modules/webdatabase/sqlite/SQLValue.h" |
43 #include "modules/webdatabase/sqlite/SQLiteTransaction.h" | 44 #include "modules/webdatabase/sqlite/SQLiteTransaction.h" |
44 #include "wtf/PtrUtil.h" | 45 #include "wtf/PtrUtil.h" |
45 #include "wtf/StdLibExtras.h" | 46 #include "wtf/StdLibExtras.h" |
46 #include <memory> | |
47 | 47 |
48 // How does a SQLTransaction work? | 48 // How does a SQLTransaction work? |
49 // ============================== | 49 // ============================== |
50 // The SQLTransaction is a state machine that executes a series of states / | 50 // The SQLTransaction is a state machine that executes a series of states / |
51 // steps. | 51 // steps. |
52 // | 52 // |
53 // The work of the transaction states are defined in section of 4.3.2 of the | 53 // The work of the transaction states are defined in section of 4.3.2 of the |
54 // webdatabase spec: http://dev.w3.org/html5/webdatabase/#processing-model | 54 // webdatabase spec: http://dev.w3.org/html5/webdatabase/#processing-model |
55 // | 55 // |
56 // the State Transition Graph at a glance: | 56 // the State Transition Graph at a glance: |
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
889 return SQLTransactionState::End; | 889 return SQLTransactionState::End; |
890 } | 890 } |
891 | 891 |
892 SQLTransactionState SQLTransactionBackend::sendToFrontendState() { | 892 SQLTransactionState SQLTransactionBackend::sendToFrontendState() { |
893 ASSERT(m_nextState != SQLTransactionState::Idle); | 893 ASSERT(m_nextState != SQLTransactionState::Idle); |
894 m_frontend->requestTransitToState(m_nextState); | 894 m_frontend->requestTransitToState(m_nextState); |
895 return SQLTransactionState::Idle; | 895 return SQLTransactionState::Idle; |
896 } | 896 } |
897 | 897 |
898 } // namespace blink | 898 } // namespace blink |
OLD | NEW |