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

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
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/download_feedback_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_feedback.cc
diff --git a/chrome/browser/safe_browsing/download_feedback.cc b/chrome/browser/safe_browsing/download_feedback.cc
index d38f08118833703925890aa620f7aed25116e003..1b2ca5502551549704b41116ab41e4db5c53ab36 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."
+ 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."
+ chrome_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();
}
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/download_feedback_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698