Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(383)

Side by Side Diff: chrome/browser/safe_browsing/client_side_detection_service.h

Issue 7408001: If we show a SafeBrowsing warning we always send the client-side detection (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merge Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 is used to fetch the client-side 6 // client-side phishing detection. This class is used to fetch the client-side
7 // model and send it to all renderers. This class is also used to send a ping 7 // model and send it to all renderers. This class is also used to send a ping
8 // back to Google to verify if a particular site is really phishing or not. 8 // back to 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 be made on the UI 10 // This class is not thread-safe and expects all calls to be made on the UI
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 const NotificationSource& source, 78 const NotificationSource& source,
79 const NotificationDetails& details); 79 const NotificationDetails& details);
80 80
81 // Sends a request to the SafeBrowsing servers with the ClientPhishingRequest. 81 // Sends a request to the SafeBrowsing servers with the ClientPhishingRequest.
82 // The URL scheme of the |url()| in the request should be HTTP. This method 82 // The URL scheme of the |url()| in the request should be HTTP. This method
83 // takes ownership of the |verdict| as well as the |callback| and calls the 83 // takes ownership of the |verdict| as well as the |callback| and calls the
84 // the callback once the result has come back from the server or if an error 84 // the callback once the result has come back from the server or if an error
85 // occurs during the fetch. If an error occurs the phishing verdict will 85 // occurs during the fetch. If an error occurs the phishing verdict will
86 // always be false. The callback is always called after 86 // always be false. The callback is always called after
87 // SendClientReportPhishingRequest() returns and on the same thread as 87 // SendClientReportPhishingRequest() returns and on the same thread as
88 // SendClientReportPhishingRequest() was called. 88 // SendClientReportPhishingRequest() was called. You may set |callback| to
89 // NULL if you don't care about the server verdict.
89 virtual void SendClientReportPhishingRequest( 90 virtual void SendClientReportPhishingRequest(
90 ClientPhishingRequest* verdict, 91 ClientPhishingRequest* verdict,
91 ClientReportPhishingRequestCallback* callback); 92 ClientReportPhishingRequestCallback* callback);
92 93
93 // Returns true if the given IP address string falls within a private 94 // Returns true if the given IP address string falls within a private
94 // (unroutable) network block. Pages which are hosted on these IP addresses 95 // (unroutable) network block. Pages which are hosted on these IP addresses
95 // are exempt from client-side phishing detection. This is called by the 96 // are exempt from client-side phishing detection. This is called by the
96 // ClientSideDetectionHost prior to sending the renderer a 97 // ClientSideDetectionHost prior to sending the renderer a
97 // SafeBrowsingMsg_StartPhishingDetection IPC. 98 // SafeBrowsingMsg_StartPhishingDetection IPC.
98 // 99 //
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 // this map to speed up lookups. 262 // this map to speed up lookups.
262 BadSubnetMap bad_subnets_; 263 BadSubnetMap bad_subnets_;
263 264
264 NotificationRegistrar registrar_; 265 NotificationRegistrar registrar_;
265 266
266 DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionService); 267 DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionService);
267 }; 268 };
268 } // namepsace safe_browsing 269 } // namepsace safe_browsing
269 270
270 #endif // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_SERVICE_H_ 271 #endif // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698