OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_SAFE_BROWSING_DB_TEST_DATABASE_MANAGER_H_ | 5 #ifndef COMPONENTS_SAFE_BROWSING_DB_TEST_DATABASE_MANAGER_H_ |
6 #define COMPONENTS_SAFE_BROWSING_DB_TEST_DATABASE_MANAGER_H_ | 6 #define COMPONENTS_SAFE_BROWSING_DB_TEST_DATABASE_MANAGER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "components/safe_browsing_db/database_manager.h" | 12 #include "components/safe_browsing_db/database_manager.h" |
13 | 13 |
14 namespace net { | |
15 class URLRequestContextGetter; | |
16 } | |
17 | |
18 namespace safe_browsing { | 14 namespace safe_browsing { |
19 | 15 |
20 struct V4ProtocolConfig; | |
21 | |
22 // This is a non-pure-virtual implementation of the SafeBrowsingDatabaseManager | 16 // This is a non-pure-virtual implementation of the SafeBrowsingDatabaseManager |
23 // interface. It's used in tests by overriding only the functions that get | 17 // interface. It's used in tests by overriding only the functions that get |
24 // called, and it'll complain if you call one that isn't overriden. The | 18 // called, and it'll complain if you call one that isn't overriden. The |
25 // non-abstract methods in the base class are not overridden. | 19 // non-abstract methods in the base class are not overridden. |
26 class TestSafeBrowsingDatabaseManager | 20 class TestSafeBrowsingDatabaseManager |
27 : public SafeBrowsingDatabaseManager { | 21 : public SafeBrowsingDatabaseManager { |
28 public: | 22 public: |
29 // SafeBrowsingDatabaseManager implementation: | 23 // SafeBrowsingDatabaseManager implementation: |
30 void CancelCheck(Client* client) override; | 24 void CancelCheck(Client* client) override; |
31 bool CanCheckResourceType(content::ResourceType resource_type) const override; | 25 bool CanCheckResourceType(content::ResourceType resource_type) const override; |
(...skipping 16 matching lines...) Expand all Loading... |
48 bool IsMalwareKillSwitchOn() override; | 42 bool IsMalwareKillSwitchOn() override; |
49 bool IsSupported() const override; | 43 bool IsSupported() const override; |
50 | 44 |
51 protected: | 45 protected: |
52 ~TestSafeBrowsingDatabaseManager() override {}; | 46 ~TestSafeBrowsingDatabaseManager() override {}; |
53 }; | 47 }; |
54 | 48 |
55 } // namespace safe_browsing | 49 } // namespace safe_browsing |
56 | 50 |
57 #endif // COMPONENTS_SAFE_BROWSING_DB_TEST_DATABASE_MANAGER_H_ | 51 #endif // COMPONENTS_SAFE_BROWSING_DB_TEST_DATABASE_MANAGER_H_ |
OLD | NEW |