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

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

Issue 2540563002: Move SafeBrowsingUIManager::UnsafeResource to security_interstitials namespace (Closed)
Patch Set: rebase update 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) 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 DidNavigateMainFrame(
50 const content::LoadCommittedDetails& details, 50 const content::LoadCommittedDetails& details,
51 const content::FrameNavigateParams& params) override; 51 const content::FrameNavigateParams& params) override;
52 52
53 // Called when the SafeBrowsingService found a hit with one of the 53 // Called when the SafeBrowsingService found a hit with one of the
54 // SafeBrowsing lists. This method is called on the UI thread. 54 // SafeBrowsing lists. This method is called on the UI thread.
55 void OnSafeBrowsingHit( 55 void OnSafeBrowsingHit(
56 const SafeBrowsingUIManager::UnsafeResource& resource) override; 56 const security_interstitials::UnsafeResource& resource) override;
57 57
58 virtual scoped_refptr<SafeBrowsingDatabaseManager> database_manager(); 58 virtual scoped_refptr<SafeBrowsingDatabaseManager> database_manager();
59 59
60 protected: 60 protected:
61 explicit ClientSideDetectionHost(content::WebContents* tab); 61 explicit ClientSideDetectionHost(content::WebContents* tab);
62 62
63 // From content::WebContentsObserver. 63 // From content::WebContentsObserver.
64 void WebContentsDestroyed() override; 64 void WebContentsDestroyed() override;
65 65
66 // Used for testing. 66 // Used for testing.
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // Max number of urls we report for each malware IP. 155 // Max number of urls we report for each malware IP.
156 static const size_t kMaxUrlsPerIP; 156 static const size_t kMaxUrlsPerIP;
157 157
158 bool should_extract_malware_features_; 158 bool should_extract_malware_features_;
159 bool should_classify_for_malware_; 159 bool should_classify_for_malware_;
160 bool pageload_complete_; 160 bool pageload_complete_;
161 161
162 // Unique page ID of the most recent unsafe site that was loaded in this tab 162 // Unique page ID of the most recent unsafe site that was loaded in this tab
163 // as well as the UnsafeResource. 163 // as well as the UnsafeResource.
164 int unsafe_unique_page_id_; 164 int unsafe_unique_page_id_;
165 std::unique_ptr<SafeBrowsingUIManager::UnsafeResource> unsafe_resource_; 165 std::unique_ptr<security_interstitials::UnsafeResource> unsafe_resource_;
166 166
167 base::WeakPtrFactory<ClientSideDetectionHost> weak_factory_; 167 base::WeakPtrFactory<ClientSideDetectionHost> weak_factory_;
168 168
169 DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionHost); 169 DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionHost);
170 }; 170 };
171 171
172 } // namespace safe_browsing 172 } // namespace safe_browsing
173 173
174 #endif // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_ 174 #endif // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698