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

Side by Side Diff: Source/WebCore/storage/SQLTransaction.h

Issue 7563014: Merge 92155 - [Chromium] WebSQLDatabase version handling is broken in multi-process browsers. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 4 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
« no previous file with comments | « Source/WebCore/storage/DatabaseSync.cpp ('k') | Source/WebCore/storage/SQLTransaction.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/WebCore/storage/DatabaseSync.cpp ('k') | Source/WebCore/storage/SQLTransaction.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698