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

Unified Diff: components/sync/engine/net/http_bridge.cc

Issue 2707363004: Network traffic annotation added to sync. (Closed)
Patch Set: 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: components/sync/engine/net/http_bridge.cc
diff --git a/components/sync/engine/net/http_bridge.cc b/components/sync/engine/net/http_bridge.cc
index 967cfba1ed4817b97704c480a5afa0a1a1a89415..63d61b38232fd2d402b8b51194f2535d8e60df02 100644
--- a/components/sync/engine/net/http_bridge.cc
+++ b/components/sync/engine/net/http_bridge.cc
@@ -24,6 +24,7 @@
#include "net/http/http_network_layer.h"
#include "net/http/http_request_headers.h"
#include "net/http/http_response_headers.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
#include "net/url_request/static_http_user_agent_settings.h"
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_request_job_factory_impl.h"
@@ -234,8 +235,30 @@ void HttpBridge::MakeAsynchronousPost() {
DCHECK(request_context_getter_.get());
fetch_state_.start_time = base::Time::Now();
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("...", R"(
+ semantics {
+ sender: "..."
Nicolas Zea 2017/03/03 22:39:55 sender: "chrome sync" description: "Chrome Sync wi
Ramin Halavati 2017/03/06 06:55:45 Done.
+ description: "..."
+ trigger: "..."
+ data: "..."
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER
+ }
+ policy {
+ cookies_allowed: false/true
+ cookies_store: "..."
+ setting: "..."
+ policy {
+ [POLICY_NAME] {
+ policy_options {mode: MANDATORY/RECOMMENDED/UNSET}
+ value: ...
+ }
+ }
+ policy_exception_justification: "..."
+ })");
fetch_state_.url_poster =
- net::URLFetcher::Create(url_for_request_, net::URLFetcher::POST, this)
+ net::URLFetcher::Create(url_for_request_, net::URLFetcher::POST, this,
+ traffic_annotation)
.release();
if (!bind_to_tracker_callback_.is_null())
bind_to_tracker_callback_.Run(fetch_state_.url_poster);

Powered by Google App Engine
This is Rietveld 408576698