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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 : m_databaseContextRegisteredCount(0) | 56 : m_databaseContextRegisteredCount(0) |
57 , m_databaseContextInstanceCount(0) | 57 , m_databaseContextInstanceCount(0) |
58 #endif | 58 #endif |
59 { | 59 { |
60 } | 60 } |
61 | 61 |
62 DatabaseManager::~DatabaseManager() | 62 DatabaseManager::~DatabaseManager() |
63 { | 63 { |
64 } | 64 } |
65 | 65 |
66 class DatabaseCreationCallbackTask FINAL : public ExecutionContextTask { | 66 class DatabaseCreationCallbackTask final : public ExecutionContextTask { |
67 public: | 67 public: |
68 static PassOwnPtr<DatabaseCreationCallbackTask> create(Database* database, D
atabaseCallback* creationCallback) | 68 static PassOwnPtr<DatabaseCreationCallbackTask> create(Database* database, D
atabaseCallback* creationCallback) |
69 { | 69 { |
70 return adoptPtr(new DatabaseCreationCallbackTask(database, creationCallb
ack)); | 70 return adoptPtr(new DatabaseCreationCallbackTask(database, creationCallb
ack)); |
71 } | 71 } |
72 | 72 |
73 virtual void performTask(ExecutionContext*) OVERRIDE | 73 virtual void performTask(ExecutionContext*) override |
74 { | 74 { |
75 m_creationCallback->handleEvent(m_database.get()); | 75 m_creationCallback->handleEvent(m_database.get()); |
76 } | 76 } |
77 | 77 |
78 virtual String taskNameForInstrumentation() const OVERRIDE | 78 virtual String taskNameForInstrumentation() const override |
79 { | 79 { |
80 return "openDatabase"; | 80 return "openDatabase"; |
81 } | 81 } |
82 | 82 |
83 private: | 83 private: |
84 DatabaseCreationCallbackTask(Database* database, DatabaseCallback* callback) | 84 DatabaseCreationCallbackTask(Database* database, DatabaseCallback* callback) |
85 : m_database(database) | 85 : m_database(database) |
86 , m_creationCallback(callback) | 86 , m_creationCallback(callback) |
87 { | 87 { |
88 } | 88 } |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 { | 218 { |
219 return DatabaseTracker::tracker().fullPathForDatabase(origin, name, createIf
DoesNotExist); | 219 return DatabaseTracker::tracker().fullPathForDatabase(origin, name, createIf
DoesNotExist); |
220 } | 220 } |
221 | 221 |
222 void DatabaseManager::logErrorMessage(ExecutionContext* context, const String& m
essage) | 222 void DatabaseManager::logErrorMessage(ExecutionContext* context, const String& m
essage) |
223 { | 223 { |
224 context->addConsoleMessage(ConsoleMessage::create(StorageMessageSource, Erro
rMessageLevel, message)); | 224 context->addConsoleMessage(ConsoleMessage::create(StorageMessageSource, Erro
rMessageLevel, message)); |
225 } | 225 } |
226 | 226 |
227 } // namespace blink | 227 } // namespace blink |
OLD | NEW |