OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "content/browser/in_process_webkit/indexed_db_transaction_callbacks.h" | 5 #include "content/browser/in_process_webkit/indexed_db_transaction_callbacks.h" |
6 | 6 |
7 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h" | 7 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h" |
8 #include "content/common/indexed_db_messages.h" | 8 #include "content/common/indexed_db_messages.h" |
9 | 9 |
10 IndexedDBTransactionCallbacks::IndexedDBTransactionCallbacks( | 10 IndexedDBTransactionCallbacks::IndexedDBTransactionCallbacks( |
11 IndexedDBDispatcherHost* dispatcher_host, | 11 IndexedDBDispatcherHost* dispatcher_host, |
12 int transaction_id) | 12 int transaction_id) |
13 : dispatcher_host_(dispatcher_host), | 13 : dispatcher_host_(dispatcher_host), |
14 transaction_id_(transaction_id) { | 14 transaction_id_(transaction_id) { |
15 } | 15 } |
16 | 16 |
17 IndexedDBTransactionCallbacks::~IndexedDBTransactionCallbacks() { | 17 IndexedDBTransactionCallbacks::~IndexedDBTransactionCallbacks() { |
18 } | 18 } |
19 | 19 |
20 void IndexedDBTransactionCallbacks::onAbort() { | 20 void IndexedDBTransactionCallbacks::onAbort() { |
michaeln
2011/08/03 03:40:40
It's also 'complete' in this onAbort case, just no
dgrogan
2011/08/03 21:45:47
This is handled in patch 6. OnTimeout is deprecat
michaeln
2011/08/04 00:23:27
Is onTimeout() called by in the current impl? If n
dgrogan
2011/08/04 23:44:55
Done.
| |
21 dispatcher_host_->Send( | 21 dispatcher_host_->Send( |
22 new IndexedDBMsg_TransactionCallbacksAbort(transaction_id_)); | 22 new IndexedDBMsg_TransactionCallbacksAbort(transaction_id_)); |
23 } | 23 } |
24 | 24 |
25 void IndexedDBTransactionCallbacks::onComplete() { | 25 void IndexedDBTransactionCallbacks::onComplete() { |
26 dispatcher_host_->TransactionComplete(transaction_id_); | |
26 dispatcher_host_->Send( | 27 dispatcher_host_->Send( |
27 new IndexedDBMsg_TransactionCallbacksComplete(transaction_id_)); | 28 new IndexedDBMsg_TransactionCallbacksComplete(transaction_id_)); |
28 } | 29 } |
29 | 30 |
30 void IndexedDBTransactionCallbacks::onTimeout() { | 31 void IndexedDBTransactionCallbacks::onTimeout() { |
31 dispatcher_host_->Send( | 32 dispatcher_host_->Send( |
32 new IndexedDBMsg_TransactionCallbacksTimeout(transaction_id_)); | 33 new IndexedDBMsg_TransactionCallbacksTimeout(transaction_id_)); |
33 } | 34 } |
OLD | NEW |