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

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

Issue 99423007: [SafeBrowsing] Reset malware indicator on page nav start. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | 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 #ifndef CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_ 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_ 6 #define CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "chrome/browser/safe_browsing/browser_feature_extractor.h" 14 #include "chrome/browser/safe_browsing/browser_feature_extractor.h"
15 #include "chrome/browser/safe_browsing/database_manager.h" 15 #include "chrome/browser/safe_browsing/database_manager.h"
16 #include "chrome/browser/safe_browsing/ui_manager.h" 16 #include "chrome/browser/safe_browsing/ui_manager.h"
17 #include "content/public/browser/navigation_controller.h"
Scott Hess - ex-Googler 2013/12/12 21:28:44 I can see IWYU arguments for this, but do those ap
Greg Billock 2013/12/12 22:14:44 I'm flexible. Agreed that the super-type has to in
17 #include "content/public/browser/notification_registrar.h" 18 #include "content/public/browser/notification_registrar.h"
18 #include "content/public/browser/resource_request_details.h" 19 #include "content/public/browser/resource_request_details.h"
19 #include "content/public/browser/web_contents_observer.h" 20 #include "content/public/browser/web_contents_observer.h"
20 #include "url/gurl.h" 21 #include "url/gurl.h"
21 22
22 namespace safe_browsing { 23 namespace safe_browsing {
23 class ClientPhishingRequest; 24 class ClientPhishingRequest;
24 class ClientSideDetectionService; 25 class ClientSideDetectionService;
25 26
26 // This class is used to receive the IPC from the renderer which 27 // This class is used to receive the IPC from the renderer which
(...skipping 13 matching lines...) Expand all
40 // From content::WebContentsObserver. 41 // From content::WebContentsObserver.
41 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 42 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
42 43
43 // From content::WebContentsObserver. If we navigate away we cancel all 44 // From content::WebContentsObserver. If we navigate away we cancel all
44 // pending callbacks that could show an interstitial, and check to see whether 45 // pending callbacks that could show an interstitial, and check to see whether
45 // we should classify the new URL. 46 // we should classify the new URL.
46 virtual void DidNavigateMainFrame( 47 virtual void DidNavigateMainFrame(
47 const content::LoadCommittedDetails& details, 48 const content::LoadCommittedDetails& details,
48 const content::FrameNavigateParams& params) OVERRIDE; 49 const content::FrameNavigateParams& params) OVERRIDE;
49 50
51 // From content::WebContentsObserver. Causes a reset to the
52 // malware_or_phishing_match_ indicator.
53 virtual void DidStartNavigationToPendingEntry(
54 const GURL& url,
55 content::NavigationController::ReloadType reload_type) OVERRIDE;
56
50 // Called when the SafeBrowsingService found a hit with one of the 57 // Called when the SafeBrowsingService found a hit with one of the
51 // SafeBrowsing lists. This method is called on the UI thread. 58 // SafeBrowsing lists. This method is called on the UI thread.
52 virtual void OnSafeBrowsingHit( 59 virtual void OnSafeBrowsingHit(
53 const SafeBrowsingUIManager::UnsafeResource& resource) OVERRIDE; 60 const SafeBrowsingUIManager::UnsafeResource& resource) OVERRIDE;
54 61
55 // Called when the SafeBrowsingService finds a match on the SB lists. 62 // Called when the SafeBrowsingService finds a match on the SB lists.
56 // Called on the UI thread. Called even if the resource is whitelisted. 63 // Called on the UI thread. Called even if the resource is whitelisted.
57 virtual void OnSafeBrowsingMatch( 64 virtual void OnSafeBrowsingMatch(
58 const SafeBrowsingUIManager::UnsafeResource& resource) OVERRIDE; 65 const SafeBrowsingUIManager::UnsafeResource& resource) OVERRIDE;
59 66
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // Set to true if we got a match on malware or phishing for the current 183 // Set to true if we got a match on malware or phishing for the current
177 // page load. Is reset to false when DidNavigateMainFrame is received. 184 // page load. Is reset to false when DidNavigateMainFrame is received.
178 bool malware_or_phishing_match_; 185 bool malware_or_phishing_match_;
179 186
180 DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionHost); 187 DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionHost);
181 }; 188 };
182 189
183 } // namespace safe_browsing 190 } // namespace safe_browsing
184 191
185 #endif // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_ 192 #endif // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698