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

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

Issue 2697193003: Network traffic annotation added to safe_browsing (Closed)
Patch Set: nits Created 3 years, 10 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..41c04897bfabaeec645010aac178266a3fb47e52 100644
--- a/chrome/browser/safe_browsing/download_feedback.cc
+++ b/chrome/browser/safe_browsing/download_feedback.cc
@@ -128,12 +128,36 @@ 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("...", R"(
+ semantics {
+ sender: "..."
Nathan Parker 2017/02/23 01:16:52 "Safe Browsing Download Protection Feedback"
Ramin Halavati 2017/02/23 08:18:24 Done.
+ description: "..."
Nathan Parker 2017/02/23 01:16:53 "When a user downloads a binary that Safe Browsing
Ramin Halavati 2017/02/23 08:18:24 Done.
+ trigger: "..."
Nathan Parker 2017/02/23 01:16:52 "When a download-protection verdict is !SAFE, and
Ramin Halavati 2017/02/23 08:18:24 Done.
+ data: "..."
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER
+ }
+ policy {
+ cookies_allowed: false/true
Nathan Parker 2017/02/23 01:16:53 true
Ramin Halavati 2017/02/23 08:18:24 Done.
+ cookies_store: "..."
Nathan Parker 2017/02/23 01:16:53 Safe Browsing cookie store
Ramin Halavati 2017/02/23 08:18:24 Done.
+ setting: "..."
Nathan Parker 2017/02/23 01:16:53 I'm not sure where we say that this is enabled by
Ramin Halavati 2017/02/23 08:18:24 Done.
+ policy {
+ [POLICY_NAME] {
+ policy_options {mode: MANDATORY/RECOMMENDED/UNSET}
+ value: ...
+ }
+ }
+ policy_exception_justification: "..."
+ })");
+
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