Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1223)

Side by Side Diff: chrome/browser/safe_browsing/test_database_manager.h

Issue 1110723002: Split to SafeBrowsingDatabaseManager into Local* and Remote*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to review. Tweak comments and list initializer. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #ifndef CHROME_BROWSER_SAFE_BROWSING_TEST_DATABASE_MANAGER_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_TEST_DATABASE_MANAGER_H_
7
8 #include <set>
9 #include <string>
10 #include <vector>
11
12 #include "chrome/browser/safe_browsing/database_manager.h"
13
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;
38
39 protected:
40 ~TestSafeBrowsingDatabaseManager() override {};
41 };
42 #endif // CHROME_BROWSER_SAFE_BROWSING_TEST_DATABASE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698