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

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

Issue 2669013002: Convert ClientSideDetectionHost to use the new navigation callbacks. (Closed)
Patch Set: nit Created 3 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/client_side_detection_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 28 matching lines...) Expand all
39 39
40 // From content::WebContentsObserver. 40 // From content::WebContentsObserver.
41 bool OnMessageReceived(const IPC::Message& message, 41 bool OnMessageReceived(const IPC::Message& message,
42 content::RenderFrameHost* render_frame_host) override; 42 content::RenderFrameHost* render_frame_host) override;
43 void DidGetResourceResponseStart( 43 void DidGetResourceResponseStart(
44 const content::ResourceRequestDetails& details) override; 44 const content::ResourceRequestDetails& details) override;
45 45
46 // From content::WebContentsObserver. If we navigate away we cancel all 46 // From content::WebContentsObserver. If we navigate away we cancel all
47 // pending callbacks that could show an interstitial, and check to see whether 47 // pending callbacks that could show an interstitial, and check to see whether
48 // we should classify the new URL. 48 // we should classify the new URL.
49 void DidNavigateMainFrame( 49 void DidFinishNavigation(
50 const content::LoadCommittedDetails& details, 50 content::NavigationHandle* navigation_handle) override;
51 const content::FrameNavigateParams& params) override;
52 51
53 // Called when the SafeBrowsingService found a hit with one of the 52 // Called when the SafeBrowsingService found a hit with one of the
54 // SafeBrowsing lists. This method is called on the UI thread. 53 // SafeBrowsing lists. This method is called on the UI thread.
55 void OnSafeBrowsingHit( 54 void OnSafeBrowsingHit(
56 const security_interstitials::UnsafeResource& resource) override; 55 const security_interstitials::UnsafeResource& resource) override;
57 56
58 virtual scoped_refptr<SafeBrowsingDatabaseManager> database_manager(); 57 virtual scoped_refptr<SafeBrowsingDatabaseManager> database_manager();
59 58
60 protected: 59 protected:
61 explicit ClientSideDetectionHost(content::WebContents* tab); 60 explicit ClientSideDetectionHost(content::WebContents* tab);
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 std::unique_ptr<security_interstitials::UnsafeResource> unsafe_resource_; 164 std::unique_ptr<security_interstitials::UnsafeResource> unsafe_resource_;
166 165
167 base::WeakPtrFactory<ClientSideDetectionHost> weak_factory_; 166 base::WeakPtrFactory<ClientSideDetectionHost> weak_factory_;
168 167
169 DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionHost); 168 DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionHost);
170 }; 169 };
171 170
172 } // namespace safe_browsing 171 } // namespace safe_browsing
173 172
174 #endif // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_ 173 #endif // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/client_side_detection_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698