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/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 WebContents* web_contents, | 108 WebContents* web_contents, |
109 const GURL& main_frame_url, | 109 const GURL& main_frame_url, |
110 const UnsafeResourceList& unsafe_resources, | 110 const UnsafeResourceList& unsafe_resources, |
111 const BaseSafeBrowsingErrorUI::SBErrorDisplayOptions& display_options) | 111 const BaseSafeBrowsingErrorUI::SBErrorDisplayOptions& display_options) |
112 : BaseBlockingPage( | 112 : BaseBlockingPage( |
113 ui_manager, | 113 ui_manager, |
114 web_contents, | 114 web_contents, |
115 main_frame_url, | 115 main_frame_url, |
116 unsafe_resources, | 116 unsafe_resources, |
117 CreateControllerClient(web_contents, unsafe_resources, ui_manager), | 117 CreateControllerClient(web_contents, unsafe_resources, ui_manager), |
118 display_options) { | 118 display_options, |
| 119 ErrorUiType::LOUD) { |
119 // Start computing threat details. They will be sent only | 120 // Start computing threat details. They will be sent only |
120 // if the user opts-in on the blocking page later. | 121 // if the user opts-in on the blocking page later. |
121 // If there's more than one malicious resources, it means the user | 122 // If there's more than one malicious resources, it means the user |
122 // clicked through the first warning, so we don't prepare additional | 123 // clicked through the first warning, so we don't prepare additional |
123 // reports. | 124 // reports. |
124 if (unsafe_resources.size() == 1 && | 125 if (unsafe_resources.size() == 1 && |
125 ShouldReportThreatDetails(unsafe_resources[0].threat_type) && | 126 ShouldReportThreatDetails(unsafe_resources[0].threat_type) && |
126 threat_details_.get() == NULL && | 127 threat_details_.get() == NULL && |
127 sb_error_ui()->CanShowExtendedReportingOption()) { | 128 sb_error_ui()->CanShowExtendedReportingOption()) { |
128 Profile* profile = | 129 Profile* profile = |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 web_contents, unsafe_resources[0].url, | 277 web_contents, unsafe_resources[0].url, |
277 GetReportingInfo(unsafe_resources), | 278 GetReportingInfo(unsafe_resources), |
278 GetSamplingEventName(GetInterstitialReason(unsafe_resources))); | 279 GetSamplingEventName(GetInterstitialReason(unsafe_resources))); |
279 | 280 |
280 return base::MakeUnique<SecurityInterstitialControllerClient>( | 281 return base::MakeUnique<SecurityInterstitialControllerClient>( |
281 web_contents, std::move(metrics_helper), profile->GetPrefs(), | 282 web_contents, std::move(metrics_helper), profile->GetPrefs(), |
282 ui_manager->app_locale(), ui_manager->default_safe_page()); | 283 ui_manager->app_locale(), ui_manager->default_safe_page()); |
283 } | 284 } |
284 | 285 |
285 } // namespace safe_browsing | 286 } // namespace safe_browsing |
OLD | NEW |