Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(408)

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page.cc

Issue 2905343002: Show interstitial on a password on focus ping with PHISHING verdict. (Closed)
Patch Set: nit Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 profile, ServiceAccessType::EXPLICIT_ACCESS)); 136 profile, ServiceAccessType::EXPLICIT_ACCESS));
137 } 137 }
138 } 138 }
139 139
140 bool SafeBrowsingBlockingPage::ShouldReportThreatDetails( 140 bool SafeBrowsingBlockingPage::ShouldReportThreatDetails(
141 SBThreatType threat_type) { 141 SBThreatType threat_type) {
142 return threat_type == SB_THREAT_TYPE_URL_PHISHING || 142 return threat_type == SB_THREAT_TYPE_URL_PHISHING ||
143 threat_type == SB_THREAT_TYPE_URL_MALWARE || 143 threat_type == SB_THREAT_TYPE_URL_MALWARE ||
144 threat_type == SB_THREAT_TYPE_URL_UNWANTED || 144 threat_type == SB_THREAT_TYPE_URL_UNWANTED ||
145 threat_type == SB_THREAT_TYPE_CLIENT_SIDE_PHISHING_URL || 145 threat_type == SB_THREAT_TYPE_CLIENT_SIDE_PHISHING_URL ||
146 threat_type == SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL; 146 threat_type == SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL ||
147 threat_type == SB_THREAT_TYPE_PASSWORD_PROTECTION_PHISHING_URL;
147 } 148 }
148 149
149 SafeBrowsingBlockingPage::~SafeBrowsingBlockingPage() { 150 SafeBrowsingBlockingPage::~SafeBrowsingBlockingPage() {
150 } 151 }
151 152
152 void SafeBrowsingBlockingPage::OverrideRendererPrefs( 153 void SafeBrowsingBlockingPage::OverrideRendererPrefs(
153 content::RendererPreferences* prefs) { 154 content::RendererPreferences* prefs) {
154 Profile* profile = Profile::FromBrowserContext( 155 Profile* profile = Profile::FromBrowserContext(
155 web_contents()->GetBrowserContext()); 156 web_contents()->GetBrowserContext());
156 renderer_preferences_util::UpdateFromSystemSettings( 157 renderer_preferences_util::UpdateFromSystemSettings(
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698