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_CALLBACKS_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_CALLBACKS_H_ |
6 #define CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_CALLBACKS_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_CALLBACKS_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "content/browser/indexed_db/indexed_db_callbacks.h" | 10 #include "content/browser/indexed_db/indexed_db_callbacks.h" |
11 #include "content/browser/indexed_db/indexed_db_connection.h" | 11 #include "content/browser/indexed_db/indexed_db_connection.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 class MockIndexedDBCallbacks : public IndexedDBCallbacks { | 15 class MockIndexedDBCallbacks : public IndexedDBCallbacks { |
16 public: | 16 public: |
17 MockIndexedDBCallbacks(); | 17 MockIndexedDBCallbacks(); |
18 explicit MockIndexedDBCallbacks(bool expect_connection); | 18 explicit MockIndexedDBCallbacks(bool expect_connection); |
19 | 19 |
20 virtual void OnSuccess() OVERRIDE; | 20 virtual void OnSuccess() override; |
21 virtual void OnSuccess(int64 result) OVERRIDE; | 21 virtual void OnSuccess(int64 result) override; |
22 virtual void OnSuccess(const std::vector<base::string16>& result) OVERRIDE; | 22 virtual void OnSuccess(const std::vector<base::string16>& result) override; |
23 virtual void OnSuccess(const IndexedDBKey& key) OVERRIDE; | 23 virtual void OnSuccess(const IndexedDBKey& key) override; |
24 virtual void OnSuccess(scoped_ptr<IndexedDBConnection> connection, | 24 virtual void OnSuccess(scoped_ptr<IndexedDBConnection> connection, |
25 const IndexedDBDatabaseMetadata& metadata) OVERRIDE; | 25 const IndexedDBDatabaseMetadata& metadata) override; |
26 IndexedDBConnection* connection() { return connection_.get(); } | 26 IndexedDBConnection* connection() { return connection_.get(); } |
27 | 27 |
28 protected: | 28 protected: |
29 virtual ~MockIndexedDBCallbacks(); | 29 virtual ~MockIndexedDBCallbacks(); |
30 | 30 |
31 scoped_ptr<IndexedDBConnection> connection_; | 31 scoped_ptr<IndexedDBConnection> connection_; |
32 | 32 |
33 private: | 33 private: |
34 bool expect_connection_; | 34 bool expect_connection_; |
35 | 35 |
36 DISALLOW_COPY_AND_ASSIGN(MockIndexedDBCallbacks); | 36 DISALLOW_COPY_AND_ASSIGN(MockIndexedDBCallbacks); |
37 }; | 37 }; |
38 | 38 |
39 } // namespace content | 39 } // namespace content |
40 | 40 |
41 #endif // CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_CALLBACKS_H_ | 41 #endif // CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_CALLBACKS_H_ |
OLD | NEW |