| 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 // Helper class which handles communication with the SafeBrowsing backends for | 5 // Helper class which handles communication with the SafeBrowsing backends for |
| 6 // client-side phishing detection. This class can be used to get a file | 6 // client-side phishing detection. This class can be used to get a file |
| 7 // descriptor to the client-side phishing model and also to send a ping back to | 7 // descriptor to the client-side phishing model and also to send a ping back to |
| 8 // Google to verify if a particular site is really phishing or not. | 8 // Google to verify if a particular site is really phishing or not. |
| 9 // | 9 // |
| 10 // This class is not thread-safe and expects all calls to GetModelFile() and | 10 // This class is not thread-safe and expects all calls to GetModelFile() and |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 // and on the same thread as SendClientReportPhishingRequest() was called. | 87 // and on the same thread as SendClientReportPhishingRequest() was called. |
| 88 virtual void SendClientReportPhishingRequest( | 88 virtual void SendClientReportPhishingRequest( |
| 89 const GURL& phishing_url, | 89 const GURL& phishing_url, |
| 90 double score, | 90 double score, |
| 91 ClientReportPhishingRequestCallback* callback); | 91 ClientReportPhishingRequestCallback* callback); |
| 92 | 92 |
| 93 // Returns true if the given IP address string falls within a private | 93 // Returns true if the given IP address string falls within a private |
| 94 // (unroutable) network block. Pages which are hosted on these IP addresses | 94 // (unroutable) network block. Pages which are hosted on these IP addresses |
| 95 // are exempt from client-side phishing detection. This is called by the | 95 // are exempt from client-side phishing detection. This is called by the |
| 96 // ClientSideDetectionHost prior to sending the renderer a | 96 // ClientSideDetectionHost prior to sending the renderer a |
| 97 // ViewMsg_StartPhishingDetection IPC. | 97 // SafeBrowsingMsg_StartPhishingDetection IPC. |
| 98 // | 98 // |
| 99 // ip_address should be a dotted IPv4 address, or an unbracketed IPv6 | 99 // ip_address should be a dotted IPv4 address, or an unbracketed IPv6 |
| 100 // address. | 100 // address. |
| 101 virtual bool IsPrivateIPAddress(const std::string& ip_address) const; | 101 virtual bool IsPrivateIPAddress(const std::string& ip_address) const; |
| 102 | 102 |
| 103 // Returns true and sets is_phishing if url is in the cache and valid. | 103 // Returns true and sets is_phishing if url is in the cache and valid. |
| 104 virtual bool GetValidCachedResult(const GURL& url, bool* is_phishing); | 104 virtual bool GetValidCachedResult(const GURL& url, bool* is_phishing); |
| 105 | 105 |
| 106 // Returns true if the url is in the cache. | 106 // Returns true if the url is in the cache. |
| 107 virtual bool IsInCache(const GURL& url); | 107 virtual bool IsInCache(const GURL& url); |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 | 256 |
| 257 // The network blocks that we consider private IP address ranges. | 257 // The network blocks that we consider private IP address ranges. |
| 258 std::vector<AddressRange> private_networks_; | 258 std::vector<AddressRange> private_networks_; |
| 259 | 259 |
| 260 DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionService); | 260 DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionService); |
| 261 }; | 261 }; |
| 262 | 262 |
| 263 } // namepsace safe_browsing | 263 } // namepsace safe_browsing |
| 264 | 264 |
| 265 #endif // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_SERVICE_H_ | 265 #endif // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_SERVICE_H_ |
| OLD | NEW |