OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ | 8 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ |
9 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ | 9 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ |
10 #pragma once | 10 #pragma once |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 | 153 |
154 // Called on the IO thread to cancel a pending check if the result is no | 154 // Called on the IO thread to cancel a pending check if the result is no |
155 // longer needed. | 155 // longer needed. |
156 void CancelCheck(Client* client); | 156 void CancelCheck(Client* client); |
157 | 157 |
158 // Called on the IO thread to display an interstitial page. | 158 // Called on the IO thread to display an interstitial page. |
159 // |url| is the url of the resource that matches a safe browsing list. | 159 // |url| is the url of the resource that matches a safe browsing list. |
160 // If the request contained a chain of redirects, |url| is the last url | 160 // If the request contained a chain of redirects, |url| is the last url |
161 // in the chain, and |original_url| is the first one (the root of the | 161 // in the chain, and |original_url| is the first one (the root of the |
162 // chain). Otherwise, |original_url| = |url|. | 162 // chain). Otherwise, |original_url| = |url|. |
163 void DisplayBlockingPage(const GURL& url, | 163 virtual void DisplayBlockingPage(const GURL& url, |
164 const GURL& original_url, | 164 const GURL& original_url, |
165 const std::vector<GURL>& redirect_urls, | 165 const std::vector<GURL>& redirect_urls, |
166 ResourceType::Type resource_type, | 166 ResourceType::Type resource_type, |
167 UrlCheckResult result, | 167 UrlCheckResult result, |
168 Client* client, | 168 Client* client, |
169 int render_process_host_id, | 169 int render_process_host_id, |
170 int render_view_id); | 170 int render_view_id); |
171 | 171 |
172 // Called on the IO thread when the SafeBrowsingProtocolManager has received | 172 // Called on the IO thread when the SafeBrowsingProtocolManager has received |
173 // the full hash results for prefix hits detected in the database. | 173 // the full hash results for prefix hits detected in the database. |
174 void HandleGetHashResults( | 174 void HandleGetHashResults( |
175 SafeBrowsingCheck* check, | 175 SafeBrowsingCheck* check, |
176 const std::vector<SBFullHashResult>& full_hashes, | 176 const std::vector<SBFullHashResult>& full_hashes, |
177 bool can_cache); | 177 bool can_cache); |
178 | 178 |
179 // Called on the IO thread. | 179 // Called on the IO thread. |
180 void HandleChunk(const std::string& list, SBChunkList* chunks); | 180 void HandleChunk(const std::string& list, SBChunkList* chunks); |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 class SafeBrowsingServiceFactory { | 409 class SafeBrowsingServiceFactory { |
410 public: | 410 public: |
411 SafeBrowsingServiceFactory() { } | 411 SafeBrowsingServiceFactory() { } |
412 virtual ~SafeBrowsingServiceFactory() { } | 412 virtual ~SafeBrowsingServiceFactory() { } |
413 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; | 413 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; |
414 private: | 414 private: |
415 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); | 415 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); |
416 }; | 416 }; |
417 | 417 |
418 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ | 418 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ |
OLD | NEW |