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

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

Issue 2530053003: chrome: Cleanup class/struct forward declarations (Closed)
Patch Set: Rebase + address comment Created 4 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 16 matching lines...) Expand all
27 #include "base/memory/ref_counted.h" 27 #include "base/memory/ref_counted.h"
28 #include "base/memory/weak_ptr.h" 28 #include "base/memory/weak_ptr.h"
29 #include "base/time/time.h" 29 #include "base/time/time.h"
30 #include "chrome/browser/safe_browsing/client_side_model_loader.h" 30 #include "chrome/browser/safe_browsing/client_side_model_loader.h"
31 #include "content/public/browser/browser_thread.h" 31 #include "content/public/browser/browser_thread.h"
32 #include "content/public/browser/notification_observer.h" 32 #include "content/public/browser/notification_observer.h"
33 #include "content/public/browser/notification_registrar.h" 33 #include "content/public/browser/notification_registrar.h"
34 #include "net/url_request/url_fetcher_delegate.h" 34 #include "net/url_request/url_fetcher_delegate.h"
35 #include "url/gurl.h" 35 #include "url/gurl.h"
36 36
37 namespace base {
38 class TimeDelta;
39 }
40
41 namespace content { 37 namespace content {
42 class RenderProcessHost; 38 class RenderProcessHost;
43 } 39 }
44 40
45 namespace net { 41 namespace net {
46 class URLFetcher; 42 class URLFetcher;
47 class URLRequestContextGetter; 43 class URLRequestContextGetter;
48 class URLRequestStatus; 44 class URLRequestStatus;
49 } // namespace net 45 } // namespace net
50 46
51 namespace safe_browsing { 47 namespace safe_browsing {
52 class ClientMalwareRequest; 48 class ClientMalwareRequest;
53 class ClientPhishingRequest; 49 class ClientPhishingRequest;
54 class ClientPhishingResponse;
55 class ClientSideModel;
56 50
57 // Main service which pushes models to the renderers, responds to classification 51 // Main service which pushes models to the renderers, responds to classification
58 // requests. This owns two ModelLoader objects. 52 // requests. This owns two ModelLoader objects.
59 class ClientSideDetectionService : public net::URLFetcherDelegate, 53 class ClientSideDetectionService : public net::URLFetcherDelegate,
60 public content::NotificationObserver { 54 public content::NotificationObserver {
61 public: 55 public:
62 // void(GURL phishing_url, bool is_phishing). 56 // void(GURL phishing_url, bool is_phishing).
63 typedef base::Callback<void(GURL, bool)> ClientReportPhishingRequestCallback; 57 typedef base::Callback<void(GURL, bool)> ClientReportPhishingRequestCallback;
64 // void(GURL original_url, GURL malware_url, bool is_malware). 58 // void(GURL original_url, GURL malware_url, bool is_malware).
65 typedef base::Callback<void(GURL, GURL, bool)> 59 typedef base::Callback<void(GURL, GURL, bool)>
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 // Used to asynchronously call the callbacks for 256 // Used to asynchronously call the callbacks for
263 // SendClientReportPhishingRequest. 257 // SendClientReportPhishingRequest.
264 base::WeakPtrFactory<ClientSideDetectionService> weak_factory_; 258 base::WeakPtrFactory<ClientSideDetectionService> weak_factory_;
265 259
266 DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionService); 260 DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionService);
267 }; 261 };
268 262
269 } // namespace safe_browsing 263 } // namespace safe_browsing
270 264
271 #endif // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_SERVICE_H_ 265 #endif // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698