Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: Source/modules/webdatabase/SQLTransactionBackend.h

Issue 205823002: Oilpan: Prepare to move AbstractSQLStatementBackend and SQLStatementBackend to Oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // APIs called from the frontend published via AbstractSQLTransactionBackend : 79 // APIs called from the frontend published via AbstractSQLTransactionBackend :
80 virtual void requestTransitToState(SQLTransactionState) OVERRIDE; 80 virtual void requestTransitToState(SQLTransactionState) OVERRIDE;
81 virtual PassRefPtr<SQLError> transactionError() OVERRIDE; 81 virtual PassRefPtr<SQLError> transactionError() OVERRIDE;
82 virtual AbstractSQLStatement* currentStatement() OVERRIDE; 82 virtual AbstractSQLStatement* currentStatement() OVERRIDE;
83 virtual void setShouldRetryCurrentStatement(bool) OVERRIDE; 83 virtual void setShouldRetryCurrentStatement(bool) OVERRIDE;
84 virtual void executeSQL(PassOwnPtr<AbstractSQLStatement>, const String& stat ement, 84 virtual void executeSQL(PassOwnPtr<AbstractSQLStatement>, const String& stat ement,
85 const Vector<SQLValue>& arguments, int permissions) OVERRIDE; 85 const Vector<SQLValue>& arguments, int permissions) OVERRIDE;
86 86
87 void doCleanup(); 87 void doCleanup();
88 88
89 void enqueueStatementBackend(PassRefPtr<SQLStatementBackend>); 89 void enqueueStatementBackend(PassRefPtrWillBeRawPtr<SQLStatementBackend>);
90 90
91 // State Machine functions: 91 // State Machine functions:
92 virtual StateFunction stateFunctionFor(SQLTransactionState) OVERRIDE; 92 virtual StateFunction stateFunctionFor(SQLTransactionState) OVERRIDE;
93 void computeNextStateAndCleanupIfNeeded(); 93 void computeNextStateAndCleanupIfNeeded();
94 94
95 // State functions: 95 // State functions:
96 SQLTransactionState acquireLock(); 96 SQLTransactionState acquireLock();
97 SQLTransactionState openTransactionAndPreflight(); 97 SQLTransactionState openTransactionAndPreflight();
98 SQLTransactionState runStatements(); 98 SQLTransactionState runStatements();
99 SQLTransactionState postflightAndCommit(); 99 SQLTransactionState postflightAndCommit();
100 SQLTransactionState cleanupAndTerminate(); 100 SQLTransactionState cleanupAndTerminate();
101 SQLTransactionState cleanupAfterTransactionErrorCallback(); 101 SQLTransactionState cleanupAfterTransactionErrorCallback();
102 102
103 SQLTransactionState unreachableState(); 103 SQLTransactionState unreachableState();
104 SQLTransactionState sendToFrontendState(); 104 SQLTransactionState sendToFrontendState();
105 105
106 SQLTransactionState nextStateForCurrentStatementError(); 106 SQLTransactionState nextStateForCurrentStatementError();
107 SQLTransactionState nextStateForTransactionError(); 107 SQLTransactionState nextStateForTransactionError();
108 SQLTransactionState runCurrentStatementAndGetNextState(); 108 SQLTransactionState runCurrentStatementAndGetNextState();
109 109
110 void getNextStatement(); 110 void getNextStatement();
111 111
112 RefPtrWillBeMember<AbstractSQLTransaction> m_frontend; // Has a reference cy cle, and will break in doCleanup(). 112 RefPtrWillBeMember<AbstractSQLTransaction> m_frontend; // Has a reference cy cle, and will break in doCleanup().
113 RefPtr<SQLStatementBackend> m_currentStatementBackend; 113 RefPtrWillBeMember<SQLStatementBackend> m_currentStatementBackend;
114 114
115 RefPtrWillBeMember<DatabaseBackend> m_database; 115 RefPtrWillBeMember<DatabaseBackend> m_database;
116 RefPtr<SQLTransactionWrapper> m_wrapper; 116 RefPtr<SQLTransactionWrapper> m_wrapper;
117 RefPtr<SQLError> m_transactionError; 117 RefPtr<SQLError> m_transactionError;
118 118
119 bool m_hasCallback; 119 bool m_hasCallback;
120 bool m_hasSuccessCallback; 120 bool m_hasSuccessCallback;
121 bool m_hasErrorCallback; 121 bool m_hasErrorCallback;
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 bool m_hasVersionMismatch;
127 127
128 Mutex m_statementMutex; 128 Mutex m_statementMutex;
129 Deque<RefPtr<SQLStatementBackend> > m_statementQueue; 129 Deque<RefPtrWillBeMember<SQLStatementBackend> > m_statementQueue;
130 130
131 OwnPtr<SQLiteTransaction> m_sqliteTransaction; 131 OwnPtr<SQLiteTransaction> m_sqliteTransaction;
132 }; 132 };
133 133
134 } // namespace WebCore 134 } // namespace WebCore
135 135
136 #endif // SQLTransactionBackend_h 136 #endif // SQLTransactionBackend_h
OLDNEW
« no previous file with comments | « Source/modules/webdatabase/SQLStatementBackend.cpp ('k') | Source/modules/webdatabase/SQLTransactionBackend.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698