Chromium Code Reviews| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 226 // Log the user perceived delay caused by SafeBrowsing. This delay is the time | 226 // Log the user perceived delay caused by SafeBrowsing. This delay is the time |
| 227 // delta starting from when we would have started reading data from the | 227 // delta starting from when we would have started reading data from the |
| 228 // network, and ending when the SafeBrowsing check completes indicating that | 228 // network, and ending when the SafeBrowsing check completes indicating that |
| 229 // the current page is 'safe'. | 229 // the current page is 'safe'. |
| 230 void LogPauseDelay(base::TimeDelta time); | 230 void LogPauseDelay(base::TimeDelta time); |
| 231 | 231 |
| 232 // When a safebrowsing blocking page goes away, it calls this method | 232 // When a safebrowsing blocking page goes away, it calls this method |
| 233 // so the service can serialize and send MalwareDetails. | 233 // so the service can serialize and send MalwareDetails. |
| 234 virtual void ReportMalwareDetails(scoped_refptr<MalwareDetails> details); | 234 virtual void ReportMalwareDetails(scoped_refptr<MalwareDetails> details); |
| 235 | 235 |
| 236 // When the MalwareDetails is done, OnReportReady is called. | |
|
lzheng
2011/03/05 00:37:50
Maybe more explanation on what is "MalwareDetails
panayiotis
2011/03/29 18:14:55
Done.
| |
| 237 virtual void OnReportReady(scoped_refptr<MalwareDetails> details); | |
| 238 | |
| 236 // Report hits to the unsafe contents (malware, phishing, unsafe download URL) | 239 // Report hits to the unsafe contents (malware, phishing, unsafe download URL) |
| 237 // to the server. Can only be called on UI thread. | 240 // to the server. Can only be called on UI thread. |
| 238 void ReportSafeBrowsingHit(const GURL& malicious_url, | 241 void ReportSafeBrowsingHit(const GURL& malicious_url, |
| 239 const GURL& page_url, | 242 const GURL& page_url, |
| 240 const GURL& referrer_url, | 243 const GURL& referrer_url, |
| 241 bool is_subresource, | 244 bool is_subresource, |
| 242 UrlCheckResult threat_type); | 245 UrlCheckResult threat_type); |
| 243 | 246 |
| 244 protected: | 247 protected: |
| 245 // Creates the safe browsing service. Need to initialize before using. | 248 // Creates the safe browsing service. Need to initialize before using. |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 447 class SafeBrowsingServiceFactory { | 450 class SafeBrowsingServiceFactory { |
| 448 public: | 451 public: |
| 449 SafeBrowsingServiceFactory() { } | 452 SafeBrowsingServiceFactory() { } |
| 450 virtual ~SafeBrowsingServiceFactory() { } | 453 virtual ~SafeBrowsingServiceFactory() { } |
| 451 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; | 454 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; |
| 452 private: | 455 private: |
| 453 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); | 456 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); |
| 454 }; | 457 }; |
| 455 | 458 |
| 456 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ | 459 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ |
| OLD | NEW |