OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2013 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
901 << databaseDebugName(); | 901 << databaseDebugName(); |
902 enableAuthorizer(); | 902 enableAuthorizer(); |
903 return Vector<String>(); | 903 return Vector<String>(); |
904 } | 904 } |
905 | 905 |
906 Vector<String> tableNames; | 906 Vector<String> tableNames; |
907 int result; | 907 int result; |
908 while ((result = statement.step()) == SQLResultRow) { | 908 while ((result = statement.step()) == SQLResultRow) { |
909 String name = statement.getColumnText(0); | 909 String name = statement.getColumnText(0); |
910 if (name != databaseInfoTableName()) | 910 if (name != databaseInfoTableName()) |
911 tableNames.append(name); | 911 tableNames.push_back(name); |
912 } | 912 } |
913 | 913 |
914 enableAuthorizer(); | 914 enableAuthorizer(); |
915 | 915 |
916 if (result != SQLResultDone) { | 916 if (result != SQLResultDone) { |
917 DLOG(ERROR) << "Error getting tables for database " << databaseDebugName(); | 917 DLOG(ERROR) << "Error getting tables for database " << databaseDebugName(); |
918 return Vector<String>(); | 918 return Vector<String>(); |
919 } | 919 } |
920 | 920 |
921 return tableNames; | 921 return tableNames; |
(...skipping 24 matching lines...) Expand all Loading... |
946 if (getDatabaseContext()->databaseThread()->isDatabaseThread()) | 946 if (getDatabaseContext()->databaseThread()->isDatabaseThread()) |
947 return m_databaseThreadSecurityOrigin.get(); | 947 return m_databaseThreadSecurityOrigin.get(); |
948 return nullptr; | 948 return nullptr; |
949 } | 949 } |
950 | 950 |
951 bool Database::opened() { | 951 bool Database::opened() { |
952 return static_cast<bool>(acquireLoad(&m_opened)); | 952 return static_cast<bool>(acquireLoad(&m_opened)); |
953 } | 953 } |
954 | 954 |
955 } // namespace blink | 955 } // namespace blink |
OLD | NEW |