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

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

Issue 2925693003: Making CSD ReportType enum consistent. (Closed)
Patch Set: Handling SBThreatType enums as well 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698