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

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

Issue 8638002: Don't send file URLs for download protection server pings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | chrome/browser/safe_browsing/download_protection_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/download_protection_service.cc
diff --git a/chrome/browser/safe_browsing/download_protection_service.cc b/chrome/browser/safe_browsing/download_protection_service.cc
index d9aed52be1d6cc2dfc79960c601f9527f6e3f64d..fd5748036374a4a95f9a5d68962fd90df1172ffd 100644
--- a/chrome/browser/safe_browsing/download_protection_service.cc
+++ b/chrome/browser/safe_browsing/download_protection_service.cc
@@ -358,7 +358,8 @@ class DownloadProtectionService::CheckClientDownloadRequest
return;
}
const GURL& final_url = info_.download_url_chain.back();
- if (!final_url.is_valid() || final_url.is_empty()) {
+ if (!final_url.is_valid() || final_url.is_empty() ||
+ !final_url.IsStandard() || final_url.SchemeIsFile()) {
RecordImprovedProtectionStats(REASON_INVALID_URL);
PostFinishTask(SAFE);
return;
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/download_protection_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698