| 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 #include "content/browser/indexed_db/indexed_db_database_callbacks.h" | 5 #include "content/browser/indexed_db/indexed_db_database_callbacks.h" |
| 6 #include "content/browser/indexed_db/indexed_db_database_callbacks_wrapper.h" | 6 #include "content/browser/indexed_db/indexed_db_database_callbacks_wrapper.h" |
| 7 | 7 |
| 8 namespace content { | 8 namespace content { |
| 9 | 9 |
| 10 IndexedDBDatabaseCallbacksWrapper::IndexedDBDatabaseCallbacksWrapper( | 10 IndexedDBDatabaseCallbacksWrapper::IndexedDBDatabaseCallbacksWrapper( |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 if (!callbacks_) | 23 if (!callbacks_) |
| 24 return; | 24 return; |
| 25 callbacks_->onVersionChange(old_version, new_version); | 25 callbacks_->onVersionChange(old_version, new_version); |
| 26 } | 26 } |
| 27 | 27 |
| 28 void IndexedDBDatabaseCallbacksWrapper::OnAbort( | 28 void IndexedDBDatabaseCallbacksWrapper::OnAbort( |
| 29 int64 transaction_id, | 29 int64 transaction_id, |
| 30 const IndexedDBDatabaseError& error) { | 30 const IndexedDBDatabaseError& error) { |
| 31 if (!callbacks_) | 31 if (!callbacks_) |
| 32 return; | 32 return; |
| 33 callbacks_->onAbort( | 33 callbacks_->onAbort(transaction_id, error); |
| 34 transaction_id, | |
| 35 WebKit::WebIDBDatabaseError(error.code(), error.message())); | |
| 36 } | 34 } |
| 37 void IndexedDBDatabaseCallbacksWrapper::OnComplete(int64 transaction_id) { | 35 void IndexedDBDatabaseCallbacksWrapper::OnComplete(int64 transaction_id) { |
| 38 if (!callbacks_) | 36 if (!callbacks_) |
| 39 return; | 37 return; |
| 40 callbacks_->onComplete(transaction_id); | 38 callbacks_->onComplete(transaction_id); |
| 41 } | 39 } |
| 42 | 40 |
| 43 } // namespace content | 41 } // namespace content |
| OLD | NEW |