| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #include "content/public/browser/interstitial_page_delegate.h" | 43 #include "content/public/browser/interstitial_page_delegate.h" |
| 44 #include "url/gurl.h" | 44 #include "url/gurl.h" |
| 45 | 45 |
| 46 namespace safe_browsing { | 46 namespace safe_browsing { |
| 47 | 47 |
| 48 class SafeBrowsingBlockingPageFactory; | 48 class SafeBrowsingBlockingPageFactory; |
| 49 class ThreatDetails; | 49 class ThreatDetails; |
| 50 | 50 |
| 51 class SafeBrowsingBlockingPage : public SecurityInterstitialPage { | 51 class SafeBrowsingBlockingPage : public SecurityInterstitialPage { |
| 52 public: | 52 public: |
| 53 typedef SafeBrowsingUIManager::UnsafeResource UnsafeResource; | 53 typedef security_interstitials::UnsafeResource UnsafeResource; |
| 54 typedef std::vector<UnsafeResource> UnsafeResourceList; | 54 typedef std::vector<UnsafeResource> UnsafeResourceList; |
| 55 typedef std::map<content::WebContents*, UnsafeResourceList> UnsafeResourceMap; | 55 typedef std::map<content::WebContents*, UnsafeResourceList> UnsafeResourceMap; |
| 56 | 56 |
| 57 // Interstitial type, used in tests. | 57 // Interstitial type, used in tests. |
| 58 static content::InterstitialPageDelegate::TypeID kTypeForTesting; | 58 static content::InterstitialPageDelegate::TypeID kTypeForTesting; |
| 59 | 59 |
| 60 ~SafeBrowsingBlockingPage() override; | 60 ~SafeBrowsingBlockingPage() override; |
| 61 | 61 |
| 62 // Creates a blocking page. Use ShowBlockingPage if you don't need to access | 62 // Creates a blocking page. Use ShowBlockingPage if you don't need to access |
| 63 // the blocking page directly. | 63 // the blocking page directly. |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( | 233 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( |
| 234 SafeBrowsingUIManager* ui_manager, | 234 SafeBrowsingUIManager* ui_manager, |
| 235 content::WebContents* web_contents, | 235 content::WebContents* web_contents, |
| 236 const GURL& main_frame_url, | 236 const GURL& main_frame_url, |
| 237 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0; | 237 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0; |
| 238 }; | 238 }; |
| 239 | 239 |
| 240 } // namespace safe_browsing | 240 } // namespace safe_browsing |
| 241 | 241 |
| 242 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ | 242 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ |
| OLD | NEW |