| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_MOCK_INDEXED_DB_DATABASE_CALLBACKS_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_DATABASE_CALLBACKS_H_ |
| 6 #define CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_DATABASE_CALLBACKS_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_DATABASE_CALLBACKS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "content/browser/indexed_db/indexed_db_callbacks.h" | 11 #include "content/browser/indexed_db/indexed_db_callbacks.h" |
| 12 #include "content/browser/indexed_db/indexed_db_connection.h" | 12 #include "content/browser/indexed_db/indexed_db_connection.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 | 15 |
| 16 class MockIndexedDBDatabaseCallbacks : public IndexedDBDatabaseCallbacks { | 16 class MockIndexedDBDatabaseCallbacks : public IndexedDBDatabaseCallbacks { |
| 17 public: | 17 public: |
| 18 MockIndexedDBDatabaseCallbacks(); | 18 MockIndexedDBDatabaseCallbacks(); |
| 19 | 19 |
| 20 void OnVersionChange(int64_t old_version, int64_t new_version) override {} | 20 void OnVersionChange(int64_t old_version, int64_t new_version) override {} |
| 21 void OnForcedClose() override; | 21 void OnForcedClose() override; |
| 22 void OnAbort(int64_t transaction_id, | 22 void OnAbort(const IndexedDBTransaction& transaction, |
| 23 const IndexedDBDatabaseError& error) override; | 23 const IndexedDBDatabaseError& error) override; |
| 24 void OnComplete(int64_t transaction_id) override {} | 24 void OnComplete(const IndexedDBTransaction& transaction) override {} |
| 25 | 25 |
| 26 bool abort_called() const { return abort_called_; } | 26 bool abort_called() const { return abort_called_; } |
| 27 bool forced_close_called() const { return forced_close_called_; } | 27 bool forced_close_called() const { return forced_close_called_; } |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 ~MockIndexedDBDatabaseCallbacks() override {} | 30 ~MockIndexedDBDatabaseCallbacks() override {} |
| 31 | 31 |
| 32 bool abort_called_; | 32 bool abort_called_; |
| 33 bool forced_close_called_; | 33 bool forced_close_called_; |
| 34 | 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(MockIndexedDBDatabaseCallbacks); | 35 DISALLOW_COPY_AND_ASSIGN(MockIndexedDBDatabaseCallbacks); |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 } // namespace content | 38 } // namespace content |
| 39 | 39 |
| 40 #endif // CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_DATABASE_CALLBACKS_H_ | 40 #endif // CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_DATABASE_CALLBACKS_H_ |
| OLD | NEW |