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

Unified Diff: chrome/browser/safe_browsing/browser_feature_extractor.cc

Issue 1098983003: Switch SchemeIsSecure to SchemeIsCryptographic for referrer-related code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/sessions/ios/ios_serialized_navigation_driver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/browser_feature_extractor.cc
diff --git a/chrome/browser/safe_browsing/browser_feature_extractor.cc b/chrome/browser/safe_browsing/browser_feature_extractor.cc
index b63d8bae7110050f0be810acc19f0a06bf81e1eb..9b01d12eee416f4c1b1ca4654b1bab4c4f525284 100644
--- a/chrome/browser/safe_browsing/browser_feature_extractor.cc
+++ b/chrome/browser/safe_browsing/browser_feature_extractor.cc
@@ -108,7 +108,7 @@ static void AddNavigationFeatures(
const std::vector<GURL>& redirect_chain,
ClientPhishingRequest* request) {
NavigationEntry* entry = controller.GetEntryAtIndex(index);
- bool is_secure_referrer = entry->GetReferrer().url.SchemeIsSecure();
+ bool is_secure_referrer = entry->GetReferrer().url.SchemeIsCryptographic();
if (!is_secure_referrer) {
AddFeature(base::StringPrintf("%s%s=%s",
feature_prefix.c_str(),
@@ -150,7 +150,7 @@ static void AddNavigationFeatures(
// We skip the last element since it should just be the current url.
for (size_t i = 0; i < redirect_chain.size() - 1; i++) {
std::string printable_redirect = redirect_chain[i].spec();
- if (redirect_chain[i].SchemeIsSecure()) {
+ if (redirect_chain[i].SchemeIsCryptographic()) {
printable_redirect = features::kSecureRedirectValue;
}
AddFeature(base::StringPrintf("%s%s[%" PRIuS "]=%s",
« no previous file with comments | « no previous file | components/sessions/ios/ios_serialized_navigation_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698