OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_MOCK_BROWSING_DATA_DATABASE_HELPER_H_ | 5 #ifndef CHROME_BROWSER_MOCK_BROWSING_DATA_DATABASE_HELPER_H_ |
6 #define CHROME_BROWSER_MOCK_BROWSING_DATA_DATABASE_HELPER_H_ | 6 #define CHROME_BROWSER_MOCK_BROWSING_DATA_DATABASE_HELPER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
| 10 #include <vector> |
10 | 11 |
11 #include "base/callback.h" | 12 #include "base/callback.h" |
12 | 13 |
13 #include "chrome/browser/browsing_data_database_helper.h" | 14 #include "chrome/browser/browsing_data_database_helper.h" |
14 | 15 |
15 // Mock for BrowsingDataDatabaseHelper. | 16 // Mock for BrowsingDataDatabaseHelper. |
16 // Use AddDatabaseSamples() or add directly to response_ vector, then call | 17 // Use AddDatabaseSamples() or add directly to response_ vector, then call |
17 // Notify(). | 18 // Notify(). |
18 class MockBrowsingDataDatabaseHelper : public BrowsingDataDatabaseHelper { | 19 class MockBrowsingDataDatabaseHelper : public BrowsingDataDatabaseHelper { |
19 public: | 20 public: |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 scoped_ptr<Callback1<const std::vector<DatabaseInfo>& >::Type > | 53 scoped_ptr<Callback1<const std::vector<DatabaseInfo>& >::Type > |
53 callback_; | 54 callback_; |
54 | 55 |
55 // Stores which databases exist. | 56 // Stores which databases exist. |
56 std::map<const std::string, bool> databases_; | 57 std::map<const std::string, bool> databases_; |
57 | 58 |
58 std::vector<DatabaseInfo> response_; | 59 std::vector<DatabaseInfo> response_; |
59 }; | 60 }; |
60 | 61 |
61 #endif // CHROME_BROWSER_MOCK_BROWSING_DATA_DATABASE_HELPER_H_ | 62 #endif // CHROME_BROWSER_MOCK_BROWSING_DATA_DATABASE_HELPER_H_ |
OLD | NEW |