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

Unified Diff: components/sync/driver/sync_stopped_reporter.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
« no previous file with comments | « no previous file | components/sync/engine/net/http_bridge.cc » ('j') | components/sync/engine/net/http_bridge.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/driver/sync_stopped_reporter.cc
diff --git a/components/sync/driver/sync_stopped_reporter.cc b/components/sync/driver/sync_stopped_reporter.cc
index 7daf57c25eba6a07d5b6d0d60b34291a11cafef0..e28a0eb2fb4df79cd00c26b9892a2bd03c44bc78 100644
--- a/components/sync/driver/sync_stopped_reporter.cc
+++ b/components/sync/driver/sync_stopped_reporter.cc
@@ -13,6 +13,7 @@
#include "components/sync/protocol/sync.pb.h"
#include "net/base/load_flags.h"
#include "net/http/http_status_code.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
namespace {
@@ -61,8 +62,29 @@ void SyncStoppedReporter::ReportSyncStopped(const std::string& access_token,
std::string msg;
event_request.SerializeToString(&msg);
- fetcher_ =
- net::URLFetcher::Create(sync_event_url_, net::URLFetcher::POST, this);
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("...", R"(
Nicolas Zea 2017/02/23 22:15:54 It would be nice if we didn't have to repeat this
Ramin Halavati 2017/02/24 07:53:03 Please elaborate me if I didn't understand your co
Nicolas Zea 2017/02/24 20:37:38 I was just thinking have the R"..." string be save
Ramin Halavati 2017/02/27 09:23:16 Current plan is extraction of R"..." strings using
+ semantics {
+ sender: "..."
Nicolas Zea 2017/03/03 22:39:55 sender: "chrome sync" description: "A network requ
Ramin Halavati 2017/03/06 06:55:45 Thanks, could you elaborate on "Store Birthday" C
Nicolas Zea 2017/03/06 17:49:20 Store birthday is the identifier for the lifetime
Ramin Halavati 2017/03/07 08:53:47 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: "..."
+ })");
+ fetcher_ = net::URLFetcher::Create(sync_event_url_, net::URLFetcher::POST,
+ this, traffic_annotation);
fetcher_->AddExtraRequestHeader(base::StringPrintf(
"%s: Bearer %s", net::HttpRequestHeaders::kAuthorization,
access_token.c_str()));
« no previous file with comments | « no previous file | components/sync/engine/net/http_bridge.cc » ('j') | components/sync/engine/net/http_bridge.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698