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

Side by Side Diff: components/safe_browsing_db/database_manager.h

Issue 1638223003: Add support for a module whitelist (goog-whitemodule-digest256) to the safe browsing db (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix browser test Created 4 years, 10 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // The Safe Browsing service is responsible for downloading anti-phishing and 5 // The Safe Browsing service is responsible for downloading anti-phishing and
6 // anti-malware tables and checking urls against them. 6 // anti-malware tables and checking urls against them.
7 7
8 #ifndef COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ 8 #ifndef COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_
9 #define COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ 9 #define COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_
10 10
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // sure we are conservative we will return true if an error occurs. This 111 // sure we are conservative we will return true if an error occurs. This
112 // method must be called on the IO thread. 112 // method must be called on the IO thread.
113 virtual bool MatchDownloadWhitelistString(const std::string& str) = 0; 113 virtual bool MatchDownloadWhitelistString(const std::string& str) = 0;
114 114
115 // Check if the |url| matches any of the full-length hashes from the off- 115 // Check if the |url| matches any of the full-length hashes from the off-
116 // domain inclusion whitelist. Returns true if there was a match and false 116 // domain inclusion whitelist. Returns true if there was a match and false
117 // otherwise. To make sure we are conservative, we will return true if an 117 // otherwise. To make sure we are conservative, we will return true if an
118 // error occurs. This method must be called on the IO thread. 118 // error occurs. This method must be called on the IO thread.
119 virtual bool MatchInclusionWhitelistUrl(const GURL& url) = 0; 119 virtual bool MatchInclusionWhitelistUrl(const GURL& url) = 0;
120 120
121 // Check if |str|, a lowercase DLL file name, matches any of the full-length
122 // hashes from the module whitelist. Returns true if there was a match and
123 // false otherwise. To make sure we are conservative we will return true if
124 // an error occurs. This method must be called on the IO thread.
125 virtual bool MatchModuleWhitelistString(const std::string& str) = 0;
126
121 // Check if the CSD malware IP matching kill switch is turned on. 127 // Check if the CSD malware IP matching kill switch is turned on.
122 virtual bool IsMalwareKillSwitchOn() = 0; 128 virtual bool IsMalwareKillSwitchOn() = 0;
123 129
124 // Check if the CSD whitelist kill switch is turned on. 130 // Check if the CSD whitelist kill switch is turned on.
125 virtual bool IsCsdWhitelistKillSwitchOn() = 0; 131 virtual bool IsCsdWhitelistKillSwitchOn() = 0;
126 132
127 // Called on the IO thread to cancel a pending check if the result is no 133 // Called on the IO thread to cancel a pending check if the result is no
128 // longer needed. Also called after the result has been handled. 134 // longer needed. Also called after the result has been handled.
129 virtual void CancelCheck(Client* client) = 0; 135 virtual void CancelCheck(Client* client) = 0;
130 136
(...skipping 16 matching lines...) Expand all
147 153
148 protected: 154 protected:
149 virtual ~SafeBrowsingDatabaseManager() {} 155 virtual ~SafeBrowsingDatabaseManager() {}
150 156
151 friend class base::RefCountedThreadSafe<SafeBrowsingDatabaseManager>; 157 friend class base::RefCountedThreadSafe<SafeBrowsingDatabaseManager>;
152 }; // class SafeBrowsingDatabaseManager 158 }; // class SafeBrowsingDatabaseManager
153 159
154 } // namespace safe_browsing 160 } // namespace safe_browsing
155 161
156 #endif // COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ 162 #endif // COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698