| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 static DatabaseManager* s_databaseManager; | 48 static DatabaseManager* s_databaseManager; |
| 49 | 49 |
| 50 DatabaseManager& DatabaseManager::manager() { | 50 DatabaseManager& DatabaseManager::manager() { |
| 51 DCHECK(isMainThread()); | 51 DCHECK(isMainThread()); |
| 52 if (!s_databaseManager) | 52 if (!s_databaseManager) |
| 53 s_databaseManager = new DatabaseManager(); | 53 s_databaseManager = new DatabaseManager(); |
| 54 return *s_databaseManager; | 54 return *s_databaseManager; |
| 55 } | 55 } |
| 56 | 56 |
| 57 DatabaseManager::DatabaseManager() | 57 DatabaseManager::DatabaseManager() {} |
| 58 { | |
| 59 } | |
| 60 | 58 |
| 61 DatabaseManager::~DatabaseManager() {} | 59 DatabaseManager::~DatabaseManager() {} |
| 62 | 60 |
| 63 // This is just for ignoring DatabaseCallback::handleEvent()'s return value. | 61 // This is just for ignoring DatabaseCallback::handleEvent()'s return value. |
| 64 static void databaseCallbackHandleEvent(DatabaseCallback* callback, | 62 static void databaseCallbackHandleEvent(DatabaseCallback* callback, |
| 65 Database* database) { | 63 Database* database) { |
| 66 InspectorInstrumentation::AsyncTask asyncTask(database->getExecutionContext(), | 64 InspectorInstrumentation::AsyncTask asyncTask(database->getExecutionContext(), |
| 67 callback); | 65 callback); |
| 68 callback->handleEvent(database); | 66 callback->handleEvent(database); |
| 69 } | 67 } |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 createIfDoesNotExist); | 216 createIfDoesNotExist); |
| 219 } | 217 } |
| 220 | 218 |
| 221 void DatabaseManager::logErrorMessage(ExecutionContext* context, | 219 void DatabaseManager::logErrorMessage(ExecutionContext* context, |
| 222 const String& message) { | 220 const String& message) { |
| 223 context->addConsoleMessage( | 221 context->addConsoleMessage( |
| 224 ConsoleMessage::create(StorageMessageSource, ErrorMessageLevel, message)); | 222 ConsoleMessage::create(StorageMessageSource, ErrorMessageLevel, message)); |
| 225 } | 223 } |
| 226 | 224 |
| 227 } // namespace blink | 225 } // namespace blink |
| OLD | NEW |