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

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

Issue 2697193003: Network traffic annotation added to safe_browsing (Closed)
Patch Set: Comments addressed. Created 3 years, 9 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
Index: chrome/browser/safe_browsing/download_feedback.cc
diff --git a/chrome/browser/safe_browsing/download_feedback.cc b/chrome/browser/safe_browsing/download_feedback.cc
index d38f08118833703925890aa620f7aed25116e003..ad1772d137792a1f1b79f998075f3574aec06f44 100644
--- a/chrome/browser/safe_browsing/download_feedback.cc
+++ b/chrome/browser/safe_browsing/download_feedback.cc
@@ -128,12 +128,48 @@ void DownloadFeedbackImpl::Start(const base::Closure& finish_callback) {
std::string metadata_string;
bool ok = report_metadata.SerializeToString(&metadata_string);
DCHECK(ok);
+
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("safe_browsing_feedback", R"(
+ semantics {
+ sender: "Safe Browsing Download Protection Feedback"
+ description:
+ "When a user downloads a binary that Safe Browsing declares as "
+ "suspicious, opted-in clients may upload that binary to Safe "
+ "Browsing to improve the classification. This helps protect users "
+ "from malware and unwanted software."
+ trigger:
+ "The browser will upload the binary to Google when a "
+ "download-protection verdict is 'Not Safe', and the user is opted "
+ "in to extended-reporting."
msramek 2017/03/09 12:06:08 nit: the dash is superfluous
Ramin Halavati 2017/03/09 12:36:49 Done.
+ data:
+ "The suspicious binary file."
+ destination: GOOGLE_OWNED_SERVICE
+ }
+ policy {
+ cookies_allowed: true
+ cookies_store: "Safe Browsing Cookie Store"
+ setting:
+ "Users can enable or disable this feature by stopping sending "
+ "security incident reports to Google via disabling 'Automatically "
+ "report details of possible security incidents to Google.' in "
+ "Chrome's settings under Advanced Settings, Privacy. The feature "
+ "is disabled by default."
+ policy {
+ SafeBrowsingExtendedReportingOptInAllowed {
+ policy_options {mode: MANDATORY}
+ SafeBrowsingExtendedReportingOptInAllowed: false
+ }
+ }
+ })");
+
uploader_ = TwoPhaseUploader::Create(
request_context_getter_.get(), file_task_runner_.get(),
GURL(kSbFeedbackURL), metadata_string, file_path_,
TwoPhaseUploader::ProgressCallback(),
base::Bind(&DownloadFeedbackImpl::FinishedUpload, base::Unretained(this),
- finish_callback));
+ finish_callback),
+ traffic_annotation);
uploader_->Start();
}

Powered by Google App Engine
This is Rietveld 408576698