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