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

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

Issue 2872133006: Add full filename to sampled-download pings. (Closed)
Patch Set: . Created 3 years, 7 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 | 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 6681ae3ea1453e15681cca7583c4fe4d0fb80954..82fd50b4a5cbeb26b809524cda354a6e44c0fea2 100644
--- a/chrome/browser/safe_browsing/download_protection_service.cc
+++ b/chrome/browser/safe_browsing/download_protection_service.cc
@@ -948,7 +948,7 @@ class DownloadProtectionService::CheckClientDownloadRequest
// Prepares URLs to be put into a ping message. Currently this just shortens
// data: URIs, other URLs are included verbatim. If this is a sampled binary,
- // we'll send a lite-ping which strips all PII.
+ // we'll send a light-ping which strips PII from the URL.
std::string SanitizeUrl(const GURL& url) const {
if (type_ == ClientDownloadRequest::SAMPLED_UNSUPPORTED_FILE)
return url.GetOrigin().spec();
@@ -1022,14 +1022,8 @@ class DownloadProtectionService::CheckClientDownloadRequest
}
request.set_user_initiated(item_->HasUserGesture());
- if (type_ == ClientDownloadRequest::SAMPLED_UNSUPPORTED_FILE) {
- request.set_file_basename(
- base::FilePath(item_->GetTargetFilePath().Extension())
- .AsUTF8Unsafe());
- } else {
- request.set_file_basename(
+ request.set_file_basename(
item_->GetTargetFilePath().BaseName().AsUTF8Unsafe());
- }
request.set_download_type(type_);
ReferrerChainData* referrer_chain_data =
« 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