| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 DatabaseManager::DatabaseManager() | 62 DatabaseManager::DatabaseManager() |
| 63 #if !ASSERT_DISABLED | 63 #if !ASSERT_DISABLED |
| 64 : m_databaseContextRegisteredCount(0) | 64 : m_databaseContextRegisteredCount(0) |
| 65 , m_databaseContextInstanceCount(0) | 65 , m_databaseContextInstanceCount(0) |
| 66 #endif | 66 #endif |
| 67 { | 67 { |
| 68 m_server = new DatabaseServer; | 68 m_server = new DatabaseServer; |
| 69 ASSERT(m_server); // We should always have a server to work with. | 69 ASSERT(m_server); // We should always have a server to work with. |
| 70 } | 70 } |
| 71 | 71 |
| 72 class DatabaseCreationCallbackTask : public ExecutionContextTask { | 72 class DatabaseCreationCallbackTask FINAL : public ExecutionContextTask { |
| 73 public: | 73 public: |
| 74 static PassOwnPtr<DatabaseCreationCallbackTask> create(PassRefPtr<Database>
database, PassOwnPtr<DatabaseCallback> creationCallback) | 74 static PassOwnPtr<DatabaseCreationCallbackTask> create(PassRefPtr<Database>
database, PassOwnPtr<DatabaseCallback> creationCallback) |
| 75 { | 75 { |
| 76 return adoptPtr(new DatabaseCreationCallbackTask(database, creationCallb
ack)); | 76 return adoptPtr(new DatabaseCreationCallbackTask(database, creationCallb
ack)); |
| 77 } | 77 } |
| 78 | 78 |
| 79 virtual void performTask(ExecutionContext*) | 79 virtual void performTask(ExecutionContext*) OVERRIDE |
| 80 { | 80 { |
| 81 m_creationCallback->handleEvent(m_database.get()); | 81 m_creationCallback->handleEvent(m_database.get()); |
| 82 } | 82 } |
| 83 | 83 |
| 84 private: | 84 private: |
| 85 DatabaseCreationCallbackTask(PassRefPtr<Database> database, PassOwnPtr<Datab
aseCallback> callback) | 85 DatabaseCreationCallbackTask(PassRefPtr<Database> database, PassOwnPtr<Datab
aseCallback> callback) |
| 86 : m_database(database) | 86 : m_database(database) |
| 87 , m_creationCallback(callback) | 87 , m_creationCallback(callback) |
| 88 { | 88 { |
| 89 } | 89 } |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 if (databaseContext) | 298 if (databaseContext) |
| 299 m_server->interruptAllDatabasesForContext(databaseContext->backend().get
()); | 299 m_server->interruptAllDatabasesForContext(databaseContext->backend().get
()); |
| 300 } | 300 } |
| 301 | 301 |
| 302 void DatabaseManager::logErrorMessage(ExecutionContext* context, const String& m
essage) | 302 void DatabaseManager::logErrorMessage(ExecutionContext* context, const String& m
essage) |
| 303 { | 303 { |
| 304 context->addConsoleMessage(StorageMessageSource, ErrorMessageLevel, message)
; | 304 context->addConsoleMessage(StorageMessageSource, ErrorMessageLevel, message)
; |
| 305 } | 305 } |
| 306 | 306 |
| 307 } // namespace WebCore | 307 } // namespace WebCore |
| OLD | NEW |