OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 Database* database = openDatabaseInternal(context, name, | 213 Database* database = openDatabaseInternal(context, name, |
214 expectedVersion, displayName, estimatedSize, setVersionInNewDatabase, er
ror, errorMessage); | 214 expectedVersion, displayName, estimatedSize, setVersionInNewDatabase, er
ror, errorMessage); |
215 if (!database) | 215 if (!database) |
216 return nullptr; | 216 return nullptr; |
217 | 217 |
218 databaseContextFor(context)->setHasOpenDatabases(); | 218 databaseContextFor(context)->setHasOpenDatabases(); |
219 DatabaseClient::from(context)->didOpenDatabase(database, context->securityOr
igin()->host(), name, expectedVersion); | 219 DatabaseClient::from(context)->didOpenDatabase(database, context->securityOr
igin()->host(), name, expectedVersion); |
220 | 220 |
221 if (database->isNew() && creationCallback) { | 221 if (database->isNew() && creationCallback) { |
222 WTF_LOG(StorageAPI, "Scheduling DatabaseCreationCallbackTask for databas
e %p\n", database); | 222 WTF_LOG(StorageAPI, "Scheduling DatabaseCreationCallbackTask for databas
e %p\n", database); |
223 database->executionContext()->postTask(FROM_HERE, DatabaseCreationCallba
ckTask::create(database, creationCallback)); | 223 database->executionContext()->postTask(BLINK_FROM_HERE, DatabaseCreation
CallbackTask::create(database, creationCallback)); |
224 } | 224 } |
225 | 225 |
226 ASSERT(database); | 226 ASSERT(database); |
227 return database; | 227 return database; |
228 } | 228 } |
229 | 229 |
230 String DatabaseManager::fullPathForDatabase(SecurityOrigin* origin, const String
& name, bool createIfDoesNotExist) | 230 String DatabaseManager::fullPathForDatabase(SecurityOrigin* origin, const String
& name, bool createIfDoesNotExist) |
231 { | 231 { |
232 return DatabaseTracker::tracker().fullPathForDatabase(origin, name, createIf
DoesNotExist); | 232 return DatabaseTracker::tracker().fullPathForDatabase(origin, name, createIf
DoesNotExist); |
233 } | 233 } |
234 | 234 |
235 void DatabaseManager::logErrorMessage(ExecutionContext* context, const String& m
essage) | 235 void DatabaseManager::logErrorMessage(ExecutionContext* context, const String& m
essage) |
236 { | 236 { |
237 context->addConsoleMessage(ConsoleMessage::create(StorageMessageSource, Erro
rMessageLevel, message)); | 237 context->addConsoleMessage(ConsoleMessage::create(StorageMessageSource, Erro
rMessageLevel, message)); |
238 } | 238 } |
239 | 239 |
240 } // namespace blink | 240 } // namespace blink |
OLD | NEW |