OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 void observeTransaction(SQLTransactionSync&); | 65 void observeTransaction(SQLTransactionSync&); |
66 | 66 |
67 const String& lastErrorMessage() const { return m_lastErrorMessage; } | 67 const String& lastErrorMessage() const { return m_lastErrorMessage; } |
68 void setLastErrorMessage(const String& message) { m_lastErrorMessage = messa
ge; } | 68 void setLastErrorMessage(const String& message) { m_lastErrorMessage = messa
ge; } |
69 void setLastErrorMessage(const char* message, int sqliteCode, const char* sq
liteMessage) | 69 void setLastErrorMessage(const char* message, int sqliteCode, const char* sq
liteMessage) |
70 { | 70 { |
71 setLastErrorMessage(String::format("%s (%d, %s)", message, sqliteCode, s
qliteMessage)); | 71 setLastErrorMessage(String::format("%s (%d, %s)", message, sqliteCode, s
qliteMessage)); |
72 } | 72 } |
73 | 73 |
74 private: | 74 private: |
75 DatabaseSync(PassRefPtr<DatabaseContext>, const String& name, | 75 DatabaseSync(DatabaseContext*, const String& name, |
76 const String& expectedVersion, const String& displayName, unsigned long
estimatedSize); | 76 const String& expectedVersion, const String& displayName, unsigned long
estimatedSize); |
77 static PassRefPtrWillBeRawPtr<DatabaseSync> create(ExecutionContext*, PassRe
fPtrWillBeRawPtr<DatabaseBackendBase>); | 77 static PassRefPtrWillBeRawPtr<DatabaseSync> create(ExecutionContext*, PassRe
fPtrWillBeRawPtr<DatabaseBackendBase>); |
78 | 78 |
79 void runTransaction(PassOwnPtr<SQLTransactionSyncCallback>, bool readOnly, E
xceptionState&); | 79 void runTransaction(PassOwnPtr<SQLTransactionSyncCallback>, bool readOnly, E
xceptionState&); |
80 void rollbackTransaction(SQLTransactionSync&); | 80 void rollbackTransaction(SQLTransactionSync&); |
81 #if ENABLE(OILPAN) | 81 #if ENABLE(OILPAN) |
82 class TransactionObserver { | 82 class TransactionObserver { |
83 public: | 83 public: |
84 explicit TransactionObserver(SQLTransactionSync& transaction) : m_transa
ction(transaction) { } | 84 explicit TransactionObserver(SQLTransactionSync& transaction) : m_transa
ction(transaction) { } |
85 ~TransactionObserver(); | 85 ~TransactionObserver(); |
(...skipping 13 matching lines...) Expand all Loading... |
99 | 99 |
100 String m_lastErrorMessage; | 100 String m_lastErrorMessage; |
101 | 101 |
102 friend class DatabaseManager; | 102 friend class DatabaseManager; |
103 friend class DatabaseServer; // FIXME: remove this when the backend has been
split out. | 103 friend class DatabaseServer; // FIXME: remove this when the backend has been
split out. |
104 }; | 104 }; |
105 | 105 |
106 } // namespace WebCore | 106 } // namespace WebCore |
107 | 107 |
108 #endif | 108 #endif |
OLD | NEW |