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