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

Unified Diff: components/safe_browsing/password_protection/password_protection_service.cc

Issue 2811483002: Ensure password protection service can receive non http/s URLs (Closed)
Patch Set: Created 3 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/safe_browsing/password_protection/password_protection_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/safe_browsing/password_protection/password_protection_service.cc
diff --git a/components/safe_browsing/password_protection/password_protection_service.cc b/components/safe_browsing/password_protection/password_protection_service.cc
index 941c909230026085c2483661f0ea0d9b5d651632..1190cdefa1fc9e732d387917ebbdc1d5e84b8757 100644
--- a/components/safe_browsing/password_protection/password_protection_service.cc
+++ b/components/safe_browsing/password_protection/password_protection_service.cc
@@ -335,6 +335,8 @@ void PasswordProtectionService::RemoveContentSettingsOnURLsDeleted(
// We might revisit this logic later to decide if we want to only delete the
// cached verdict whose cache expression matches this URL.
for (const history::URLRow& row : deleted_rows) {
+ if (!row.url().SchemeIsHTTPOrHTTPS())
+ continue;
GURL url_key = GetHostNameWithHTTPScheme(row.url());
std::unique_ptr<base::DictionaryValue> verdict_dictionary =
base::DictionaryValue::From(content_settings_->GetWebsiteSetting(
« no previous file with comments | « no previous file | components/safe_browsing/password_protection/password_protection_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698