Refactor WebsiteSettings to operate on a SecurityInfo
[chromium-blink-merge.git] / chrome / browser / safe_browsing / test_database_manager.h
blob9bbb49a21a8c1a8ef1c433a4b5f5cf17339c7061
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SAFE_BROWSING_TEST_DATABASE_MANAGER_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_TEST_DATABASE_MANAGER_H_
8 #include <set>
9 #include <string>
10 #include <vector>
12 #include "chrome/browser/safe_browsing/database_manager.h"
14 // This is a non-pure-virtual implementation of the SafeBrowsingDatabaseManager
15 // 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.
17 class TestSafeBrowsingDatabaseManager
18 : public SafeBrowsingDatabaseManager {
19 public:
20 // SafeBrowsingDatabaseManager implementation:
21 bool CanCheckUrl(const GURL& url) const override;
22 bool download_protection_enabled() const override;
23 bool CheckBrowseUrl(const GURL& url, Client* client) override;
24 bool CheckDownloadUrl(const std::vector<GURL>& url_chain,
25 Client* client) override;
26 bool CheckExtensionIDs(const std::set<std::string>& extension_ids,
27 Client* client) override;
28 bool MatchCsdWhitelistUrl(const GURL& url) override;
29 bool MatchMalwareIP(const std::string& ip_address) override;
30 bool MatchDownloadWhitelistUrl(const GURL& url) override;
31 bool MatchDownloadWhitelistString(const std::string& str) override;
32 bool MatchInclusionWhitelistUrl(const GURL& url) override;
33 bool IsMalwareKillSwitchOn() override;
34 bool IsCsdWhitelistKillSwitchOn() override;
35 void CancelCheck(Client* client) override;
36 void StartOnIOThread() override;
37 void StopOnIOThread(bool shutdown) override;
39 protected:
40 ~TestSafeBrowsingDatabaseManager() override {};
42 #endif // CHROME_BROWSER_SAFE_BROWSING_TEST_DATABASE_MANAGER_H_