| 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 CHROME_BROWSER_SAFE_BROWSING_TEST_DATABASE_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_TEST_DATABASE_MANAGER_H_ |
| 6 #define CHROME_BROWSER_SAFE_BROWSING_TEST_DATABASE_MANAGER_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_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 "chrome/browser/safe_browsing/database_manager.h" | 12 #include "chrome/browser/safe_browsing/database_manager.h" |
| 13 | 13 |
| 14 namespace safe_browsing { |
| 15 |
| 14 // This is a non-pure-virtual implementation of the SafeBrowsingDatabaseManager | 16 // This is a non-pure-virtual implementation of the SafeBrowsingDatabaseManager |
| 15 // 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 |
| 16 // called, and it'll complain if you call one that isn't overriden. | 18 // called, and it'll complain if you call one that isn't overriden. |
| 17 class TestSafeBrowsingDatabaseManager | 19 class TestSafeBrowsingDatabaseManager |
| 18 : public SafeBrowsingDatabaseManager { | 20 : public SafeBrowsingDatabaseManager { |
| 19 public: | 21 public: |
| 20 // SafeBrowsingDatabaseManager implementation: | 22 // SafeBrowsingDatabaseManager implementation: |
| 21 bool IsSupported() const override; | 23 bool IsSupported() const override; |
| 22 bool ChecksAreAlwaysAsync() const override; | 24 bool ChecksAreAlwaysAsync() const override; |
| 23 bool CanCheckResourceType(content::ResourceType resource_type) const override; | 25 bool CanCheckResourceType(content::ResourceType resource_type) const override; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 35 bool MatchInclusionWhitelistUrl(const GURL& url) override; | 37 bool MatchInclusionWhitelistUrl(const GURL& url) override; |
| 36 bool IsMalwareKillSwitchOn() override; | 38 bool IsMalwareKillSwitchOn() override; |
| 37 bool IsCsdWhitelistKillSwitchOn() override; | 39 bool IsCsdWhitelistKillSwitchOn() override; |
| 38 void CancelCheck(Client* client) override; | 40 void CancelCheck(Client* client) override; |
| 39 void StartOnIOThread() override; | 41 void StartOnIOThread() override; |
| 40 void StopOnIOThread(bool shutdown) override; | 42 void StopOnIOThread(bool shutdown) override; |
| 41 | 43 |
| 42 protected: | 44 protected: |
| 43 ~TestSafeBrowsingDatabaseManager() override {}; | 45 ~TestSafeBrowsingDatabaseManager() override {}; |
| 44 }; | 46 }; |
| 47 |
| 48 } // namespace safe_browsing |
| 49 |
| 45 #endif // CHROME_BROWSER_SAFE_BROWSING_TEST_DATABASE_MANAGER_H_ | 50 #endif // CHROME_BROWSER_SAFE_BROWSING_TEST_DATABASE_MANAGER_H_ |
| OLD | NEW |