| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 class PendingGCRunner; | 49 class PendingGCRunner; |
| 50 class SQLTransactionClient; | 50 class SQLTransactionClient; |
| 51 class SQLTransactionCoordinator; | 51 class SQLTransactionCoordinator; |
| 52 class TaskSynchronizer; | 52 class TaskSynchronizer; |
| 53 | 53 |
| 54 class DatabaseThread : public ThreadSafeRefCountedWillBeGarbageCollectedFinalize
d<DatabaseThread> { | 54 class DatabaseThread : public ThreadSafeRefCountedWillBeGarbageCollectedFinalize
d<DatabaseThread> { |
| 55 public: | 55 public: |
| 56 static PassRefPtrWillBeRawPtr<DatabaseThread> create() { return adoptRefWill
BeNoop(new DatabaseThread); } | 56 static PassRefPtrWillBeRawPtr<DatabaseThread> create() { return adoptRefWill
BeNoop(new DatabaseThread); } |
| 57 ~DatabaseThread(); | 57 ~DatabaseThread(); |
| 58 void trace(Visitor*); | 58 void trace(Visitor*); |
| 59 void dispose(); |
| 59 | 60 |
| 60 void start(); | 61 void start(); |
| 61 void requestTermination(TaskSynchronizer* cleanupSync); | 62 void requestTermination(TaskSynchronizer* cleanupSync); |
| 62 bool terminationRequested(TaskSynchronizer* = 0) const; | 63 bool terminationRequested(TaskSynchronizer* = 0) const; |
| 63 | 64 |
| 64 void scheduleTask(PassOwnPtr<DatabaseTask>); | 65 void scheduleTask(PassOwnPtr<DatabaseTask>); |
| 65 | 66 |
| 66 void recordDatabaseOpen(DatabaseBackend*); | 67 void recordDatabaseOpen(DatabaseBackend*); |
| 67 void recordDatabaseClosed(DatabaseBackend*); | 68 void recordDatabaseClosed(DatabaseBackend*); |
| 68 bool isDatabaseOpen(DatabaseBackend*); | 69 bool isDatabaseOpen(DatabaseBackend*); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 90 OwnPtrWillBeMember<SQLTransactionCoordinator> m_transactionCoordinator; | 91 OwnPtrWillBeMember<SQLTransactionCoordinator> m_transactionCoordinator; |
| 91 TaskSynchronizer* m_cleanupSync; | 92 TaskSynchronizer* m_cleanupSync; |
| 92 | 93 |
| 93 mutable Mutex m_terminationRequestedMutex; | 94 mutable Mutex m_terminationRequestedMutex; |
| 94 bool m_terminationRequested; | 95 bool m_terminationRequested; |
| 95 }; | 96 }; |
| 96 | 97 |
| 97 } // namespace blink | 98 } // namespace blink |
| 98 | 99 |
| 99 #endif // DatabaseThread_h | 100 #endif // DatabaseThread_h |
| OLD | NEW |