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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 HistoryServiceFactory::GetForProfile( | 134 HistoryServiceFactory::GetForProfile( |
135 profile, ServiceAccessType::EXPLICIT_ACCESS)); | 135 profile, ServiceAccessType::EXPLICIT_ACCESS)); |
136 } | 136 } |
137 } | 137 } |
138 | 138 |
139 bool SafeBrowsingBlockingPage::ShouldReportThreatDetails( | 139 bool SafeBrowsingBlockingPage::ShouldReportThreatDetails( |
140 SBThreatType threat_type) { | 140 SBThreatType threat_type) { |
141 return threat_type == SB_THREAT_TYPE_URL_PHISHING || | 141 return threat_type == SB_THREAT_TYPE_URL_PHISHING || |
142 threat_type == SB_THREAT_TYPE_URL_MALWARE || | 142 threat_type == SB_THREAT_TYPE_URL_MALWARE || |
143 threat_type == SB_THREAT_TYPE_URL_UNWANTED || | 143 threat_type == SB_THREAT_TYPE_URL_UNWANTED || |
144 threat_type == SB_THREAT_TYPE_CLIENT_SIDE_PHISHING_URL || | 144 threat_type == SB_THREAT_TYPE_URL_CLIENT_SIDE_PHISHING || |
145 threat_type == SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL || | 145 threat_type == SB_THREAT_TYPE_URL_CLIENT_SIDE_MALWARE || |
146 threat_type == SB_THREAT_TYPE_PASSWORD_PROTECTION_PHISHING_URL; | 146 threat_type == SB_THREAT_TYPE_URL_PASSWORD_PROTECTION_PHISHING; |
147 } | 147 } |
148 | 148 |
149 SafeBrowsingBlockingPage::~SafeBrowsingBlockingPage() { | 149 SafeBrowsingBlockingPage::~SafeBrowsingBlockingPage() { |
150 } | 150 } |
151 | 151 |
152 void SafeBrowsingBlockingPage::OverrideRendererPrefs( | 152 void SafeBrowsingBlockingPage::OverrideRendererPrefs( |
153 content::RendererPreferences* prefs) { | 153 content::RendererPreferences* prefs) { |
154 Profile* profile = Profile::FromBrowserContext( | 154 Profile* profile = Profile::FromBrowserContext( |
155 web_contents()->GetBrowserContext()); | 155 web_contents()->GetBrowserContext()); |
156 renderer_preferences_util::UpdateFromSystemSettings( | 156 renderer_preferences_util::UpdateFromSystemSettings( |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 web_contents, unsafe_resources[0].url, | 276 web_contents, unsafe_resources[0].url, |
277 GetReportingInfo(unsafe_resources), | 277 GetReportingInfo(unsafe_resources), |
278 GetSamplingEventName(GetInterstitialReason(unsafe_resources))); | 278 GetSamplingEventName(GetInterstitialReason(unsafe_resources))); |
279 | 279 |
280 return base::MakeUnique<SecurityInterstitialControllerClient>( | 280 return base::MakeUnique<SecurityInterstitialControllerClient>( |
281 web_contents, std::move(metrics_helper), profile->GetPrefs(), | 281 web_contents, std::move(metrics_helper), profile->GetPrefs(), |
282 ui_manager->app_locale(), ui_manager->default_safe_page()); | 282 ui_manager->app_locale(), ui_manager->default_safe_page()); |
283 } | 283 } |
284 | 284 |
285 } // namespace safe_browsing | 285 } // namespace safe_browsing |
OLD | NEW |