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

Unified Diff: components/sync/engine_impl/attachments/attachment_uploader_impl.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_impl/attachments/attachment_uploader_impl.cc
diff --git a/components/sync/engine_impl/attachments/attachment_uploader_impl.cc b/components/sync/engine_impl/attachments/attachment_uploader_impl.cc
index b0249ec76854d392e6fe081f000b959c65b78b93..87a9fce26df3b42e9e4b4a19ece3a834e614fa54 100644
--- a/components/sync/engine_impl/attachments/attachment_uploader_impl.cc
+++ b/components/sync/engine_impl/attachments/attachment_uploader_impl.cc
@@ -24,6 +24,7 @@
#include "google_apis/gaia/gaia_constants.h"
#include "net/base/load_flags.h"
#include "net/http/http_status_code.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_fetcher_delegate.h"
#include "net/url_request/url_request_status.h"
@@ -214,7 +215,29 @@ void AttachmentUploaderImpl::UploadState::OnGetTokenSuccess(
DCHECK_EQ(access_token_request_.get(), request);
access_token_request_.reset();
access_token_ = access_token;
- fetcher_ = net::URLFetcher::Create(upload_url_, net::URLFetcher::POST, this);
+ net::NetworkTrafficAnnotationTag traffic_annotation =
Nicolas Zea 2017/03/03 22:39:56 same as the http bridge
Ramin Halavati 2017/03/06 06:55:45 Done.
+ net::DefineNetworkTrafficAnnotation("...", R"(
+ semantics {
+ sender: "..."
+ 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(upload_url_, net::URLFetcher::POST, this,
+ traffic_annotation);
ConfigureURLFetcherCommon(fetcher_.get(), access_token_, raw_store_birthday_,
model_type_, url_request_context_getter_.get());
data_use_measurement::DataUseUserData::AttachToFetcher(

Powered by Google App Engine
This is Rietveld 408576698