OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 // DatabaseServer's factory methods for creating database backends. | 72 // DatabaseServer's factory methods for creating database backends. |
73 // | 73 // |
74 // The factory methods will either call openAndVerifyVersion() or | 74 // The factory methods will either call openAndVerifyVersion() or |
75 // performOpenAndVerify(). These methods will add the newly instantiated | 75 // performOpenAndVerify(). These methods will add the newly instantiated |
76 // database backend if they succeed in opening the requested database. | 76 // database backend if they succeed in opening the requested database. |
77 // In the case of failure to open the database, the factory methods will | 77 // In the case of failure to open the database, the factory methods will |
78 // simply discard the newly instantiated database backend when they return. | 78 // simply discard the newly instantiated database backend when they return. |
79 // The ref counting mechanims will automatically destruct the un-added | 79 // The ref counting mechanims will automatically destruct the un-added |
80 // (and un-returned) databases instances. | 80 // (and un-returned) databases instances. |
81 | 81 |
82 namespace WebCore { | 82 namespace blink { |
83 | 83 |
84 static const char versionKey[] = "WebKitDatabaseVersionKey"; | 84 static const char versionKey[] = "WebKitDatabaseVersionKey"; |
85 static const char infoTableName[] = "__WebKitDatabaseInfoTable__"; | 85 static const char infoTableName[] = "__WebKitDatabaseInfoTable__"; |
86 | 86 |
87 static String formatErrorMessage(const char* message, int sqliteErrorCode, const
char* sqliteErrorMessage) | 87 static String formatErrorMessage(const char* message, int sqliteErrorCode, const
char* sqliteErrorMessage) |
88 { | 88 { |
89 return String::format("%s (%d %s)", message, sqliteErrorCode, sqliteErrorMes
sage); | 89 return String::format("%s (%d %s)", message, sqliteErrorCode, sqliteErrorMes
sage); |
90 } | 90 } |
91 | 91 |
92 static bool retrieveTextResultFromDatabase(SQLiteDatabase& db, const String& que
ry, String& resultString) | 92 static bool retrieveTextResultFromDatabase(SQLiteDatabase& db, const String& que
ry, String& resultString) |
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 void DatabaseBackendBase::logErrorMessage(const String& message) | 665 void DatabaseBackendBase::logErrorMessage(const String& message) |
666 { | 666 { |
667 executionContext()->addConsoleMessage(StorageMessageSource, ErrorMessageLeve
l, message); | 667 executionContext()->addConsoleMessage(StorageMessageSource, ErrorMessageLeve
l, message); |
668 } | 668 } |
669 | 669 |
670 ExecutionContext* DatabaseBackendBase::executionContext() const | 670 ExecutionContext* DatabaseBackendBase::executionContext() const |
671 { | 671 { |
672 return databaseContext()->executionContext(); | 672 return databaseContext()->executionContext(); |
673 } | 673 } |
674 | 674 |
675 } // namespace WebCore | 675 } // namespace blink |
OLD | NEW |