| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 namespace WebCore { | 45 namespace WebCore { |
| 46 | 46 |
| 47 class DatabaseCallback; | 47 class DatabaseCallback; |
| 48 class ExceptionState; | 48 class ExceptionState; |
| 49 class SQLTransactionSync; | 49 class SQLTransactionSync; |
| 50 class SQLTransactionSyncCallback; | 50 class SQLTransactionSyncCallback; |
| 51 class SecurityOrigin; | 51 class SecurityOrigin; |
| 52 | 52 |
| 53 // Instances of this class should be created and used only on the worker's conte
xt thread. | 53 // Instances of this class should be created and used only on the worker's conte
xt thread. |
| 54 class DatabaseSync : public DatabaseBase, public DatabaseBackendSync, public Scr
iptWrappable { | 54 class DatabaseSync FINAL : public DatabaseBase, public DatabaseBackendSync, publ
ic ScriptWrappable { |
| 55 public: | 55 public: |
| 56 virtual ~DatabaseSync(); | 56 virtual ~DatabaseSync(); |
| 57 | 57 |
| 58 void changeVersion(const String& oldVersion, const String& newVersion, PassO
wnPtr<SQLTransactionSyncCallback>, ExceptionState&); | 58 void changeVersion(const String& oldVersion, const String& newVersion, PassO
wnPtr<SQLTransactionSyncCallback>, ExceptionState&); |
| 59 void transaction(PassOwnPtr<SQLTransactionSyncCallback>, ExceptionState&); | 59 void transaction(PassOwnPtr<SQLTransactionSyncCallback>, ExceptionState&); |
| 60 void readTransaction(PassOwnPtr<SQLTransactionSyncCallback>, ExceptionState&
); | 60 void readTransaction(PassOwnPtr<SQLTransactionSyncCallback>, ExceptionState&
); |
| 61 | 61 |
| 62 virtual void closeImmediately(); | 62 virtual void closeImmediately() OVERRIDE; |
| 63 | 63 |
| 64 const String& lastErrorMessage() const { return m_lastErrorMessage; } | 64 const String& lastErrorMessage() const { return m_lastErrorMessage; } |
| 65 void setLastErrorMessage(const String& message) { m_lastErrorMessage = messa
ge; } | 65 void setLastErrorMessage(const String& message) { m_lastErrorMessage = messa
ge; } |
| 66 void setLastErrorMessage(const char* message, int sqliteCode) | 66 void setLastErrorMessage(const char* message, int sqliteCode) |
| 67 { | 67 { |
| 68 setLastErrorMessage(String::format("%s (%d)", message, sqliteCode)); | 68 setLastErrorMessage(String::format("%s (%d)", message, sqliteCode)); |
| 69 } | 69 } |
| 70 void setLastErrorMessage(const char* message, int sqliteCode, const char* sq
liteMessage) | 70 void setLastErrorMessage(const char* message, int sqliteCode, const char* sq
liteMessage) |
| 71 { | 71 { |
| 72 setLastErrorMessage(String::format("%s (%d, %s)", message, sqliteCode, s
qliteMessage)); | 72 setLastErrorMessage(String::format("%s (%d, %s)", message, sqliteCode, s
qliteMessage)); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 83 | 83 |
| 84 String m_lastErrorMessage; | 84 String m_lastErrorMessage; |
| 85 | 85 |
| 86 friend class DatabaseManager; | 86 friend class DatabaseManager; |
| 87 friend class DatabaseServer; // FIXME: remove this when the backend has been
split out. | 87 friend class DatabaseServer; // FIXME: remove this when the backend has been
split out. |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 } // namespace WebCore | 90 } // namespace WebCore |
| 91 | 91 |
| 92 #endif | 92 #endif |
| OLD | NEW |