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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 void AddPreemptiveEvent() { pending_preemptive_events_++; } | 66 void AddPreemptiveEvent() { pending_preemptive_events_++; } |
67 void DidCompletePreemptiveEvent() { | 67 void DidCompletePreemptiveEvent() { |
68 pending_preemptive_events_--; | 68 pending_preemptive_events_--; |
69 DCHECK_GE(pending_preemptive_events_, 0); | 69 DCHECK_GE(pending_preemptive_events_, 0); |
70 } | 70 } |
71 IndexedDBBackingStore::Transaction* BackingStoreTransaction() { | 71 IndexedDBBackingStore::Transaction* BackingStoreTransaction() { |
72 return transaction_.get(); | 72 return transaction_.get(); |
73 } | 73 } |
74 int64 id() const { return id_; } | 74 int64 id() const { return id_; } |
75 | 75 |
76 IndexedDBDatabase* database() const { return database_; } | 76 IndexedDBDatabase* database() const { return database_.get(); } |
77 IndexedDBDatabaseCallbacks* connection() const { return callbacks_; } | 77 IndexedDBDatabaseCallbacks* connection() const { return callbacks_.get(); } |
78 | 78 |
79 State state() const { return state_; } | 79 State state() const { return state_; } |
80 bool IsTimeoutTimerRunning() const { return timeout_timer_.IsRunning(); } | 80 bool IsTimeoutTimerRunning() const { return timeout_timer_.IsRunning(); } |
81 | 81 |
82 struct Diagnostics { | 82 struct Diagnostics { |
83 base::Time creation_time; | 83 base::Time creation_time; |
84 base::Time start_time; | 84 base::Time start_time; |
85 int tasks_scheduled; | 85 int tasks_scheduled; |
86 int tasks_completed; | 86 int tasks_completed; |
87 }; | 87 }; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // requests are processed before the timer fires, assume the script is | 168 // requests are processed before the timer fires, assume the script is |
169 // unresponsive and abort to unblock the transaction queue. | 169 // unresponsive and abort to unblock the transaction queue. |
170 base::OneShotTimer<IndexedDBTransaction> timeout_timer_; | 170 base::OneShotTimer<IndexedDBTransaction> timeout_timer_; |
171 | 171 |
172 Diagnostics diagnostics_; | 172 Diagnostics diagnostics_; |
173 }; | 173 }; |
174 | 174 |
175 } // namespace content | 175 } // namespace content |
176 | 176 |
177 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_TRANSACTION_H_ | 177 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_TRANSACTION_H_ |
OLD | NEW |