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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 DatabaseClient::from(context)->didOpenDatabase( | 193 DatabaseClient::from(context)->didOpenDatabase( |
194 database, context->getSecurityOrigin()->host(), name, expectedVersion); | 194 database, context->getSecurityOrigin()->host(), name, expectedVersion); |
195 | 195 |
196 if (database->isNew() && creationCallback) { | 196 if (database->isNew() && creationCallback) { |
197 STORAGE_DVLOG(1) << "Scheduling DatabaseCreationCallbackTask for database " | 197 STORAGE_DVLOG(1) << "Scheduling DatabaseCreationCallbackTask for database " |
198 << database; | 198 << database; |
199 InspectorInstrumentation::asyncTaskScheduled( | 199 InspectorInstrumentation::asyncTaskScheduled( |
200 database->getExecutionContext(), "openDatabase", creationCallback); | 200 database->getExecutionContext(), "openDatabase", creationCallback); |
201 TaskRunnerHelper::get(TaskType::DatabaseAccess, | 201 TaskRunnerHelper::get(TaskType::DatabaseAccess, |
202 database->getExecutionContext()) | 202 database->getExecutionContext()) |
203 ->postTask(BLINK_FROM_HERE, WTF::bind(&databaseCallbackHandleEvent, | 203 ->postTask(BLINK_FROM_HERE, |
204 wrapPersistent(creationCallback), | 204 WTF::bind(&databaseCallbackHandleEvent, |
205 wrapPersistent(database))); | 205 wrapPersistent(creationCallback), |
| 206 wrapPersistent(database))); |
206 } | 207 } |
207 | 208 |
208 ASSERT(database); | 209 ASSERT(database); |
209 return database; | 210 return database; |
210 } | 211 } |
211 | 212 |
212 String DatabaseManager::fullPathForDatabase(SecurityOrigin* origin, | 213 String DatabaseManager::fullPathForDatabase(SecurityOrigin* origin, |
213 const String& name, | 214 const String& name, |
214 bool createIfDoesNotExist) { | 215 bool createIfDoesNotExist) { |
215 return DatabaseTracker::tracker().fullPathForDatabase(origin, name, | 216 return DatabaseTracker::tracker().fullPathForDatabase(origin, name, |
216 createIfDoesNotExist); | 217 createIfDoesNotExist); |
217 } | 218 } |
218 | 219 |
219 void DatabaseManager::logErrorMessage(ExecutionContext* context, | 220 void DatabaseManager::logErrorMessage(ExecutionContext* context, |
220 const String& message) { | 221 const String& message) { |
221 context->addConsoleMessage( | 222 context->addConsoleMessage( |
222 ConsoleMessage::create(StorageMessageSource, ErrorMessageLevel, message)); | 223 ConsoleMessage::create(StorageMessageSource, ErrorMessageLevel, message)); |
223 } | 224 } |
224 | 225 |
225 } // namespace blink | 226 } // namespace blink |
OLD | NEW |