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