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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 void PopulateInterstitialStrings( | 131 void PopulateInterstitialStrings( |
132 base::DictionaryValue* load_time_data) override; | 132 base::DictionaryValue* load_time_data) override; |
133 void AfterShow() override {} | 133 void AfterShow() override {} |
134 | 134 |
135 // After a safe browsing interstitial where the user opted-in to the | 135 // After a safe browsing interstitial where the user opted-in to the |
136 // report but clicked "proceed anyway", we delay the call to | 136 // report but clicked "proceed anyway", we delay the call to |
137 // ThreatDetails::FinishCollection() by this much time (in | 137 // ThreatDetails::FinishCollection() by this much time (in |
138 // milliseconds), in order to get data from the blocked resource itself. | 138 // milliseconds), in order to get data from the blocked resource itself. |
139 int64_t malware_details_proceed_delay_ms_; | 139 int64_t malware_details_proceed_delay_ms_; |
140 | 140 |
141 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest, | |
142 MalwareReportsTransitionDisabled); | |
143 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest, | |
144 MalwareReportsToggling); | |
145 | |
146 // Checks if we should even show the threat details option. For example, we | 141 // Checks if we should even show the threat details option. For example, we |
147 // don't show it in incognito mode. | 142 // don't show it in incognito mode. |
148 bool CanShowThreatDetailsOption(); | 143 bool CanShowThreatDetailsOption(); |
149 | 144 |
150 // Called when the insterstitial is going away. If there is a | 145 // Called when the insterstitial is going away. If there is a |
151 // pending threat details object, we look at the user's | 146 // pending threat details object, we look at the user's |
152 // preferences, and if the option to send threat details is | 147 // preferences, and if the option to send threat details is |
153 // enabled, the report is scheduled to be sent on the |ui_manager_|. | 148 // enabled, the report is scheduled to be sent on the |ui_manager_|. |
154 void FinishThreatDetails(int64_t delay_ms, bool did_proceed, int num_visits); | 149 void FinishThreatDetails(int64_t delay_ms, bool did_proceed, int num_visits); |
155 | 150 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( | 222 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( |
228 SafeBrowsingUIManager* ui_manager, | 223 SafeBrowsingUIManager* ui_manager, |
229 content::WebContents* web_contents, | 224 content::WebContents* web_contents, |
230 const GURL& main_frame_url, | 225 const GURL& main_frame_url, |
231 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0; | 226 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0; |
232 }; | 227 }; |
233 | 228 |
234 } // namespace safe_browsing | 229 } // namespace safe_browsing |
235 | 230 |
236 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ | 231 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ |
OLD | NEW |