| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 // Don't instantiate this class directly, use ShowBlockingPage instead. | 101 // Don't instantiate this class directly, use ShowBlockingPage instead. |
| 102 SafeBrowsingBlockingPage(SafeBrowsingUIManager* ui_manager, | 102 SafeBrowsingBlockingPage(SafeBrowsingUIManager* ui_manager, |
| 103 content::WebContents* web_contents, | 103 content::WebContents* web_contents, |
| 104 const UnsafeResourceList& unsafe_resources); | 104 const UnsafeResourceList& unsafe_resources); |
| 105 | 105 |
| 106 // SecurityInterstitialPage methods: | 106 // SecurityInterstitialPage methods: |
| 107 bool ShouldCreateNewNavigation() const override; | 107 bool ShouldCreateNewNavigation() const override; |
| 108 void PopulateInterstitialStrings( | 108 void PopulateInterstitialStrings( |
| 109 base::DictionaryValue* load_time_data) override; | 109 base::DictionaryValue* load_time_data) override; |
| 110 void AfterShow() override {} |
| 110 | 111 |
| 111 // After a safe browsing interstitial where the user opted-in to the | 112 // After a safe browsing interstitial where the user opted-in to the |
| 112 // report but clicked "proceed anyway", we delay the call to | 113 // report but clicked "proceed anyway", we delay the call to |
| 113 // ThreatDetails::FinishCollection() by this much time (in | 114 // ThreatDetails::FinishCollection() by this much time (in |
| 114 // milliseconds), in order to get data from the blocked resource itself. | 115 // milliseconds), in order to get data from the blocked resource itself. |
| 115 int64 malware_details_proceed_delay_ms_; | 116 int64 malware_details_proceed_delay_ms_; |
| 116 | 117 |
| 117 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest, | 118 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest, |
| 118 MalwareReportsTransitionDisabled); | 119 MalwareReportsTransitionDisabled); |
| 119 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest, | 120 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest, |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 | 206 |
| 206 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( | 207 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( |
| 207 SafeBrowsingUIManager* ui_manager, | 208 SafeBrowsingUIManager* ui_manager, |
| 208 content::WebContents* web_contents, | 209 content::WebContents* web_contents, |
| 209 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0; | 210 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0; |
| 210 }; | 211 }; |
| 211 | 212 |
| 212 } // namespace safe_browsing | 213 } // namespace safe_browsing |
| 213 | 214 |
| 214 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ | 215 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ |
| OLD | NEW |