| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 | 232 |
| 233 // Called on the IO thread to reset the database. | 233 // Called on the IO thread to reset the database. |
| 234 void ResetDatabase(); | 234 void ResetDatabase(); |
| 235 | 235 |
| 236 // Log the user perceived delay caused by SafeBrowsing. This delay is the time | 236 // Log the user perceived delay caused by SafeBrowsing. This delay is the time |
| 237 // delta starting from when we would have started reading data from the | 237 // delta starting from when we would have started reading data from the |
| 238 // network, and ending when the SafeBrowsing check completes indicating that | 238 // network, and ending when the SafeBrowsing check completes indicating that |
| 239 // the current page is 'safe'. | 239 // the current page is 'safe'. |
| 240 void LogPauseDelay(base::TimeDelta time); | 240 void LogPauseDelay(base::TimeDelta time); |
| 241 | 241 |
| 242 // When a safebrowsing blocking page goes away, it calls this method | 242 // Called on the IO thread by the MalwareDetails with the serialized |
| 243 // so the service can serialize and send MalwareDetails. | 243 // protocol buffer, so the service can send it over. |
| 244 virtual void ReportMalwareDetails(scoped_refptr<MalwareDetails> details); | 244 virtual void SendSerializedMalwareDetails(const std::string& serialized); |
| 245 | 245 |
| 246 // Report hits to the unsafe contents (malware, phishing, unsafe download URL) | 246 // Report hits to the unsafe contents (malware, phishing, unsafe download URL) |
| 247 // to the server. Can only be called on UI thread. | 247 // to the server. Can only be called on UI thread. |
| 248 void ReportSafeBrowsingHit(const GURL& malicious_url, | 248 void ReportSafeBrowsingHit(const GURL& malicious_url, |
| 249 const GURL& page_url, | 249 const GURL& page_url, |
| 250 const GURL& referrer_url, | 250 const GURL& referrer_url, |
| 251 bool is_subresource, | 251 bool is_subresource, |
| 252 UrlCheckResult threat_type); | 252 UrlCheckResult threat_type); |
| 253 | 253 |
| 254 protected: | 254 protected: |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 class SafeBrowsingServiceFactory { | 461 class SafeBrowsingServiceFactory { |
| 462 public: | 462 public: |
| 463 SafeBrowsingServiceFactory() { } | 463 SafeBrowsingServiceFactory() { } |
| 464 virtual ~SafeBrowsingServiceFactory() { } | 464 virtual ~SafeBrowsingServiceFactory() { } |
| 465 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; | 465 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; |
| 466 private: | 466 private: |
| 467 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); | 467 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); |
| 468 }; | 468 }; |
| 469 | 469 |
| 470 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ | 470 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ |
| OLD | NEW |