| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 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 * | 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 namespace blink { | 44 namespace blink { |
| 45 | 45 |
| 46 class DatabaseTask { | 46 class DatabaseTask { |
| 47 WTF_MAKE_NONCOPYABLE(DatabaseTask); USING_FAST_MALLOC(DatabaseTask); | 47 WTF_MAKE_NONCOPYABLE(DatabaseTask); USING_FAST_MALLOC(DatabaseTask); |
| 48 public: | 48 public: |
| 49 virtual ~DatabaseTask(); | 49 virtual ~DatabaseTask(); |
| 50 | 50 |
| 51 void run(); | 51 void run(); |
| 52 | 52 |
| 53 Database* database() const { return m_database.get(); } | 53 Database* database() const { return m_database.get(); } |
| 54 #if ENABLE(ASSERT) | |
| 55 bool hasSynchronizer() const { return m_synchronizer; } | |
| 56 #endif | |
| 57 | 54 |
| 58 protected: | 55 protected: |
| 59 DatabaseTask(Database*, TaskSynchronizer*); | 56 DatabaseTask(Database*, TaskSynchronizer*); |
| 60 | 57 |
| 61 private: | 58 private: |
| 62 virtual void doPerformTask() = 0; | 59 virtual void doPerformTask() = 0; |
| 63 virtual void taskCancelled() { } | 60 virtual void taskCancelled() { } |
| 64 | 61 |
| 65 CrossThreadPersistent<Database> m_database; | 62 CrossThreadPersistent<Database> m_database; |
| 66 TaskSynchronizer* m_synchronizer; | 63 TaskSynchronizer* m_synchronizer; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 #if DCHECK_IS_ON() | 143 #if DCHECK_IS_ON() |
| 147 const char* debugTaskName() const override; | 144 const char* debugTaskName() const override; |
| 148 #endif | 145 #endif |
| 149 | 146 |
| 150 Vector<String>& m_tableNames; | 147 Vector<String>& m_tableNames; |
| 151 }; | 148 }; |
| 152 | 149 |
| 153 } // namespace blink | 150 } // namespace blink |
| 154 | 151 |
| 155 #endif // DatabaseTask_h | 152 #endif // DatabaseTask_h |
| OLD | NEW |