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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 { | 76 { |
77 } | 77 } |
78 | 78 |
79 class DatabaseCreationCallbackTask final : public ExecutionContextTask { | 79 class DatabaseCreationCallbackTask final : public ExecutionContextTask { |
80 public: | 80 public: |
81 static PassOwnPtr<DatabaseCreationCallbackTask> create(Database* database, D
atabaseCallback* creationCallback) | 81 static PassOwnPtr<DatabaseCreationCallbackTask> create(Database* database, D
atabaseCallback* creationCallback) |
82 { | 82 { |
83 return adoptPtr(new DatabaseCreationCallbackTask(database, creationCallb
ack)); | 83 return adoptPtr(new DatabaseCreationCallbackTask(database, creationCallb
ack)); |
84 } | 84 } |
85 | 85 |
86 virtual void performTask(ExecutionContext*) override | 86 void performTask(ExecutionContext*) override |
87 { | 87 { |
88 m_creationCallback->handleEvent(m_database.get()); | 88 m_creationCallback->handleEvent(m_database.get()); |
89 } | 89 } |
90 | 90 |
91 virtual String taskNameForInstrumentation() const override | 91 String taskNameForInstrumentation() const override |
92 { | 92 { |
93 return "openDatabase"; | 93 return "openDatabase"; |
94 } | 94 } |
95 | 95 |
96 private: | 96 private: |
97 DatabaseCreationCallbackTask(Database* database, DatabaseCallback* callback) | 97 DatabaseCreationCallbackTask(Database* database, DatabaseCallback* callback) |
98 : m_database(database) | 98 : m_database(database) |
99 , m_creationCallback(callback) | 99 , m_creationCallback(callback) |
100 { | 100 { |
101 } | 101 } |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |