| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2013 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 #include "modules/webdatabase/SQLTransactionCoordinator.h" | 47 #include "modules/webdatabase/SQLTransactionCoordinator.h" |
| 48 #include "modules/webdatabase/SQLTransactionErrorCallback.h" | 48 #include "modules/webdatabase/SQLTransactionErrorCallback.h" |
| 49 #include "modules/webdatabase/sqlite/SQLiteStatement.h" | 49 #include "modules/webdatabase/sqlite/SQLiteStatement.h" |
| 50 #include "modules/webdatabase/sqlite/SQLiteTransaction.h" | 50 #include "modules/webdatabase/sqlite/SQLiteTransaction.h" |
| 51 #include "platform/Logging.h" | 51 #include "platform/Logging.h" |
| 52 #include "platform/heap/SafePoint.h" | 52 #include "platform/heap/SafePoint.h" |
| 53 #include "platform/weborigin/DatabaseIdentifier.h" | 53 #include "platform/weborigin/DatabaseIdentifier.h" |
| 54 #include "public/platform/Platform.h" | 54 #include "public/platform/Platform.h" |
| 55 #include "public/platform/WebDatabaseObserver.h" | 55 #include "public/platform/WebDatabaseObserver.h" |
| 56 #include "wtf/Atomics.h" | 56 #include "wtf/Atomics.h" |
| 57 #include "wtf/CurrentTime.h" |
| 57 | 58 |
| 58 // Registering "opened" databases with the DatabaseTracker | 59 // Registering "opened" databases with the DatabaseTracker |
| 59 // ======================================================= | 60 // ======================================================= |
| 60 // The DatabaseTracker maintains a list of databases that have been | 61 // The DatabaseTracker maintains a list of databases that have been |
| 61 // "opened" so that the client can call interrupt or delete on every database | 62 // "opened" so that the client can call interrupt or delete on every database |
| 62 // associated with a DatabaseContext. | 63 // associated with a DatabaseContext. |
| 63 // | 64 // |
| 64 // We will only call DatabaseTracker::addOpenDatabase() to add the database | 65 // We will only call DatabaseTracker::addOpenDatabase() to add the database |
| 65 // to the tracker as opened when we've succeeded in opening the database, | 66 // to the tracker as opened when we've succeeded in opening the database, |
| 66 // and will set m_opened to true. Similarly, we only call | 67 // and will set m_opened to true. Similarly, we only call |
| (...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 901 return m_databaseThreadSecurityOrigin.get(); | 902 return m_databaseThreadSecurityOrigin.get(); |
| 902 return 0; | 903 return 0; |
| 903 } | 904 } |
| 904 | 905 |
| 905 bool Database::opened() | 906 bool Database::opened() |
| 906 { | 907 { |
| 907 return static_cast<bool>(acquireLoad(&m_opened)); | 908 return static_cast<bool>(acquireLoad(&m_opened)); |
| 908 } | 909 } |
| 909 | 910 |
| 910 } // namespace blink | 911 } // namespace blink |
| OLD | NEW |