| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 | 10 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 bool CheckUrl(const GURL& url, Client* client); | 94 bool CheckUrl(const GURL& url, Client* client); |
| 95 | 95 |
| 96 // Cancels a pending check if the result is no longer needed. | 96 // Cancels a pending check if the result is no longer needed. |
| 97 void CancelCheck(Client* client); | 97 void CancelCheck(Client* client); |
| 98 | 98 |
| 99 // Displays an interstitial page. | 99 // Displays an interstitial page. |
| 100 void DisplayBlockingPage(const GURL& url, | 100 void DisplayBlockingPage(const GURL& url, |
| 101 ResourceType::Type resource_type, | 101 ResourceType::Type resource_type, |
| 102 UrlCheckResult result, | 102 UrlCheckResult result, |
| 103 Client* client, | 103 Client* client, |
| 104 MessageLoop* ui_loop, | |
| 105 int render_process_host_id, | 104 int render_process_host_id, |
| 106 int render_view_id); | 105 int render_view_id); |
| 107 | 106 |
| 108 // Bundle of SafeBrowsing state for one URL check. | 107 // Bundle of SafeBrowsing state for one URL check. |
| 109 struct SafeBrowsingCheck { | 108 struct SafeBrowsingCheck { |
| 110 GURL url; | 109 GURL url; |
| 111 Client* client; | 110 Client* client; |
| 112 bool need_get_hash; | 111 bool need_get_hash; |
| 113 base::Time start; // Time that check was sent to SB service. | 112 base::Time start; // Time that check was sent to SB service. |
| 114 UrlCheckResult result; | 113 UrlCheckResult result; |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 Client* client; | 275 Client* client; |
| 277 GURL url; | 276 GURL url; |
| 278 base::Time start; | 277 base::Time start; |
| 279 } QueuedCheck; | 278 } QueuedCheck; |
| 280 std::deque<QueuedCheck> queued_checks_; | 279 std::deque<QueuedCheck> queued_checks_; |
| 281 | 280 |
| 282 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingService); | 281 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingService); |
| 283 }; | 282 }; |
| 284 | 283 |
| 285 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ | 284 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ |
| OLD | NEW |