| OLD | NEW |
| 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 // Classes for managing the SafeBrowsing interstitial pages. | 5 // Classes for managing the SafeBrowsing interstitial pages. |
| 6 // | 6 // |
| 7 // When a user is about to visit a page the SafeBrowsing system has deemed to | 7 // When a user is about to visit a page the SafeBrowsing system has deemed to |
| 8 // be malicious, either as malware or a phishing page, we show an interstitial | 8 // be malicious, either as malware or a phishing page, we show an interstitial |
| 9 // page with some options (go back, continue) to give the user a chance to avoid | 9 // page with some options (go back, continue) to give the user a chance to avoid |
| 10 // the harmful page. | 10 // the harmful page. |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 // during this interstitial page. | 214 // during this interstitial page. |
| 215 bool has_expanded_see_more_section_; | 215 bool has_expanded_see_more_section_; |
| 216 | 216 |
| 217 // Whether the interstitial should create a view. | 217 // Whether the interstitial should create a view. |
| 218 bool create_view_; | 218 bool create_view_; |
| 219 | 219 |
| 220 // Which type of interstitial this is. | 220 // Which type of interstitial this is. |
| 221 enum { | 221 enum { |
| 222 TYPE_MALWARE, | 222 TYPE_MALWARE, |
| 223 TYPE_PHISHING, | 223 TYPE_PHISHING, |
| 224 TYPE_MALWARE_AND_PHISHING, | |
| 225 } interstitial_type_; | 224 } interstitial_type_; |
| 226 | 225 |
| 227 // The factory used to instantiate SafeBrowsingBlockingPage objects. | 226 // The factory used to instantiate SafeBrowsingBlockingPage objects. |
| 228 // Usefull for tests, so they can provide their own implementation of | 227 // Usefull for tests, so they can provide their own implementation of |
| 229 // SafeBrowsingBlockingPage. | 228 // SafeBrowsingBlockingPage. |
| 230 static SafeBrowsingBlockingPageFactory* factory_; | 229 static SafeBrowsingBlockingPageFactory* factory_; |
| 231 | 230 |
| 232 // How many times is this same URL in history? Used for histogramming. | 231 // How many times is this same URL in history? Used for histogramming. |
| 233 int num_visits_; | 232 int num_visits_; |
| 234 base::CancelableTaskTracker request_tracker_; | 233 base::CancelableTaskTracker request_tracker_; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 251 public: | 250 public: |
| 252 virtual ~SafeBrowsingBlockingPageFactory() { } | 251 virtual ~SafeBrowsingBlockingPageFactory() { } |
| 253 | 252 |
| 254 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( | 253 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( |
| 255 SafeBrowsingUIManager* ui_manager, | 254 SafeBrowsingUIManager* ui_manager, |
| 256 content::WebContents* web_contents, | 255 content::WebContents* web_contents, |
| 257 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0; | 256 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0; |
| 258 }; | 257 }; |
| 259 | 258 |
| 260 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ | 259 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ |
| OLD | NEW |