| 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 void HandleOneCheck(SafeBrowsingCheck* check, | 259 void HandleOneCheck(SafeBrowsingCheck* check, |
| 260 const std::vector<SBFullHashResult>& full_hashes); | 260 const std::vector<SBFullHashResult>& full_hashes); |
| 261 | 261 |
| 262 // Invoked on the UI thread to show the blocking page. | 262 // Invoked on the UI thread to show the blocking page. |
| 263 void DoDisplayBlockingPage(const UnsafeResource& resource); | 263 void DoDisplayBlockingPage(const UnsafeResource& resource); |
| 264 | 264 |
| 265 // Report any pages that contain malware sub-resources to the SafeBrowsing | 265 // Report any pages that contain malware sub-resources to the SafeBrowsing |
| 266 // service. | 266 // service. |
| 267 void ReportMalware(const GURL& malware_url, | 267 void ReportMalware(const GURL& malware_url, |
| 268 const GURL& page_url, | 268 const GURL& page_url, |
| 269 const GURL& referrer_url); | 269 const GURL& referrer_url, |
| 270 bool is_subresource); |
| 270 | 271 |
| 271 CurrentChecks checks_; | 272 CurrentChecks checks_; |
| 272 | 273 |
| 273 // Used for issuing only one GetHash request for a given prefix. | 274 // Used for issuing only one GetHash request for a given prefix. |
| 274 GetHashRequests gethash_requests_; | 275 GetHashRequests gethash_requests_; |
| 275 | 276 |
| 276 // The sqlite database. We don't use a scoped_ptr because it needs to be | 277 // The sqlite database. We don't use a scoped_ptr because it needs to be |
| 277 // destructed on a different thread than this object. | 278 // destructed on a different thread than this object. |
| 278 SafeBrowsingDatabase* database_; | 279 SafeBrowsingDatabase* database_; |
| 279 | 280 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 302 // Indicates if we're in the midst of trying to close the database. If this | 303 // Indicates if we're in the midst of trying to close the database. If this |
| 303 // is true, nothing on the IO thread should access the database. | 304 // is true, nothing on the IO thread should access the database. |
| 304 bool closing_database_; | 305 bool closing_database_; |
| 305 | 306 |
| 306 std::deque<QueuedCheck> queued_checks_; | 307 std::deque<QueuedCheck> queued_checks_; |
| 307 | 308 |
| 308 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingService); | 309 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingService); |
| 309 }; | 310 }; |
| 310 | 311 |
| 311 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ | 312 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ |
| OLD | NEW |