diff options
Diffstat (limited to 'Source/WebCore/Modules/webdatabase/SQLError.h')
-rw-r--r-- | Source/WebCore/Modules/webdatabase/SQLError.h | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/Source/WebCore/Modules/webdatabase/SQLError.h b/Source/WebCore/Modules/webdatabase/SQLError.h index fd423abdb..4e276ca78 100644 --- a/Source/WebCore/Modules/webdatabase/SQLError.h +++ b/Source/WebCore/Modules/webdatabase/SQLError.h @@ -10,7 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * 3. Neither the name of Apple Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * @@ -26,10 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SQLError_h -#define SQLError_h - -#if ENABLE(SQL_DATABASE) +#pragma once #include <wtf/ThreadSafeRefCounted.h> #include <wtf/text/WTFString.h> @@ -38,12 +35,12 @@ namespace WebCore { class SQLError : public ThreadSafeRefCounted<SQLError> { public: - static PassRefPtr<SQLError> create(unsigned code, const String& message) { return adoptRef(new SQLError(code, message)); } - static PassRefPtr<SQLError> create(unsigned code, const char* message, int sqliteCode) + static Ref<SQLError> create(unsigned code, const String& message) { return adoptRef(*new SQLError(code, message)); } + static Ref<SQLError> create(unsigned code, const char* message, int sqliteCode) { return create(code, String::format("%s (%d)", message, sqliteCode)); } - static PassRefPtr<SQLError> create(unsigned code, const char* message, int sqliteCode, const char* sqliteMessage) + static Ref<SQLError> create(unsigned code, const char* message, int sqliteCode, const char* sqliteMessage) { return create(code, String::format("%s (%d %s)", message, sqliteCode, sqliteMessage)); } @@ -68,8 +65,4 @@ private: String m_message; }; -} - -#endif - -#endif // SQLError_h +} // namespace WebCore |