| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_TRANSACTION_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_TRANSACTION_H_ |
| 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_TRANSACTION_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_TRANSACTION_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <stack> | 10 #include <stack> |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 base::Time creation_time; | 79 base::Time creation_time; |
| 80 base::Time start_time; | 80 base::Time start_time; |
| 81 int tasks_scheduled; | 81 int tasks_scheduled; |
| 82 int tasks_completed; | 82 int tasks_completed; |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 const Diagnostics& diagnostics() const { return diagnostics_; } | 85 const Diagnostics& diagnostics() const { return diagnostics_; } |
| 86 | 86 |
| 87 private: | 87 private: |
| 88 FRIEND_TEST_ALL_PREFIXES(IndexedDBTransactionTestMode, AbortPreemptive); | 88 FRIEND_TEST_ALL_PREFIXES(IndexedDBTransactionTestMode, AbortPreemptive); |
| 89 FRIEND_TEST_ALL_PREFIXES(IndexedDBTransactionTest, Timeout); |
| 89 | 90 |
| 90 friend class base::RefCounted<IndexedDBTransaction>; | 91 friend class base::RefCounted<IndexedDBTransaction>; |
| 91 virtual ~IndexedDBTransaction(); | 92 virtual ~IndexedDBTransaction(); |
| 92 | 93 |
| 93 void RunTasksIfStarted(); | 94 void RunTasksIfStarted(); |
| 94 | 95 |
| 95 bool IsTaskQueueEmpty() const; | 96 bool IsTaskQueueEmpty() const; |
| 96 bool HasPendingTasks() const; | 97 bool HasPendingTasks() const; |
| 97 | 98 |
| 98 void ProcessTaskQueue(); | 99 void ProcessTaskQueue(); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 // requests are processed before the timer fires, assume the script is | 152 // requests are processed before the timer fires, assume the script is |
| 152 // unresponsive and abort to unblock the transaction queue. | 153 // unresponsive and abort to unblock the transaction queue. |
| 153 base::OneShotTimer<IndexedDBTransaction> timeout_timer_; | 154 base::OneShotTimer<IndexedDBTransaction> timeout_timer_; |
| 154 | 155 |
| 155 Diagnostics diagnostics_; | 156 Diagnostics diagnostics_; |
| 156 }; | 157 }; |
| 157 | 158 |
| 158 } // namespace content | 159 } // namespace content |
| 159 | 160 |
| 160 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_TRANSACTION_H_ | 161 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_TRANSACTION_H_ |
| OLD | NEW |