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 // Implementation of the SafeBrowsingBlockingPage class. | 5 // Implementation of the SafeBrowsingBlockingPage class. |
6 | 6 |
7 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" | 7 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" |
8 | 8 |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "chrome/browser/history/history_service_factory.h" | 10 #include "chrome/browser/history/history_service_factory.h" |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 sb_error_ui()->is_extended_reporting_enabled() && | 187 sb_error_ui()->is_extended_reporting_enabled() && |
188 sb_error_ui()->is_extended_reporting_opt_in_allowed(); | 188 sb_error_ui()->is_extended_reporting_opt_in_allowed(); |
189 if (!enabled) | 189 if (!enabled) |
190 return; | 190 return; |
191 | 191 |
192 controller()->metrics_helper()->RecordUserInteraction( | 192 controller()->metrics_helper()->RecordUserInteraction( |
193 security_interstitials::MetricsHelper::EXTENDED_REPORTING_IS_ENABLED); | 193 security_interstitials::MetricsHelper::EXTENDED_REPORTING_IS_ENABLED); |
194 // Finish the malware details collection, send it over. | 194 // Finish the malware details collection, send it over. |
195 BrowserThread::PostDelayedTask( | 195 BrowserThread::PostDelayedTask( |
196 BrowserThread::IO, FROM_HERE, | 196 BrowserThread::IO, FROM_HERE, |
197 base::Bind(&ThreatDetails::FinishCollection, threat_details_, | 197 base::BindOnce(&ThreatDetails::FinishCollection, threat_details_, |
198 did_proceed, num_visits), | 198 did_proceed, num_visits), |
199 delay); | 199 delay); |
200 } | 200 } |
201 | 201 |
202 // static | 202 // static |
203 SafeBrowsingBlockingPage* SafeBrowsingBlockingPage::CreateBlockingPage( | 203 SafeBrowsingBlockingPage* SafeBrowsingBlockingPage::CreateBlockingPage( |
204 BaseUIManager* ui_manager, | 204 BaseUIManager* ui_manager, |
205 WebContents* web_contents, | 205 WebContents* web_contents, |
206 const GURL& main_frame_url, | 206 const GURL& main_frame_url, |
207 const UnsafeResource& unsafe_resource) { | 207 const UnsafeResource& unsafe_resource) { |
208 const UnsafeResourceList resources{unsafe_resource}; | 208 const UnsafeResourceList resources{unsafe_resource}; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 web_contents, unsafe_resources[0].url, | 269 web_contents, unsafe_resources[0].url, |
270 GetReportingInfo(unsafe_resources), | 270 GetReportingInfo(unsafe_resources), |
271 GetSamplingEventName(GetInterstitialReason(unsafe_resources))); | 271 GetSamplingEventName(GetInterstitialReason(unsafe_resources))); |
272 | 272 |
273 return base::MakeUnique<SecurityInterstitialControllerClient>( | 273 return base::MakeUnique<SecurityInterstitialControllerClient>( |
274 web_contents, std::move(metrics_helper), profile->GetPrefs(), | 274 web_contents, std::move(metrics_helper), profile->GetPrefs(), |
275 ui_manager->app_locale(), ui_manager->default_safe_page()); | 275 ui_manager->app_locale(), ui_manager->default_safe_page()); |
276 } | 276 } |
277 | 277 |
278 } // namespace safe_browsing | 278 } // namespace safe_browsing |
OLD | NEW |