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

Unified Diff: chrome/service/cloud_print/cloud_print_url_fetcher.cc

Issue 2804613002: Network traffic annotation added to cloud_print_url_fetcher. (Closed)
Patch Set: Annotation updated. Created 3 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/cloud_print/cloud_print_url_fetcher.cc
diff --git a/chrome/service/cloud_print/cloud_print_url_fetcher.cc b/chrome/service/cloud_print/cloud_print_url_fetcher.cc
index eb05c6eb3524baf6ad66af36510ae8e60953080f..4cea475bd4f60abcb20b8eaf8fab9c23c57dc22c 100644
--- a/chrome/service/cloud_print/cloud_print_url_fetcher.cc
+++ b/chrome/service/cloud_print/cloud_print_url_fetcher.cc
@@ -18,6 +18,7 @@
#include "components/data_use_measurement/core/data_use_user_data.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_request_status.h"
#include "url/gurl.h"
@@ -259,7 +260,37 @@ void CloudPrintURLFetcher::StartRequestHelper(
REQUEST_MAX);
// Persist the additional headers in case we need to retry the request.
additional_headers_ = additional_headers;
- request_ = net::URLFetcher::Create(0, url, request_type, this);
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("cloud_print_url_fetcher", R"(
+ semantics {
+ sender: "Cloud Print"
+ description:
+ "Google Cloud Print allows users to print to printers from Chrome "
+ "and Android without needing to install print drivers."
+ trigger:
+ "Printing and running background Cloud Print services."
Ramin Halavati 2017/04/19 05:59:07 Can "background" be elaborated?
Lei Zhang 2017/04/19 19:27:25 This is part of the Cloud Print Connector that can
+ data: "..."
Ramin Halavati 2017/04/19 05:59:07 What is sent?
Lei Zhang 2017/04/19 19:27:26 StartPostRequest() and StartGetRequest() both use
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER/LOCAL
Ramin Halavati 2017/04/19 05:59:07 I assume it should be OTHER?
Lei Zhang 2017/04/19 19:27:25 That would be consistent with "cloud_print_privet_
+ }
+ policy {
+ cookies_allowed: false
+ setting:
+ "This feature cannot be disabled by settings."
+ chrome_policy {
+ CloudPrintProxyEnabled {
+ policy_options {mode: MANDATORY}
+ CloudPrintProxyEnabled: false
+ }
+ }
+ chrome_policy {
+ CloudPrintSubmitEnabled {
+ policy_options {mode: MANDATORY}
+ CloudPrintSubmitEnabled: false
+ }
+ }
+ })");
Ramin Halavati 2017/04/19 05:59:07 Are both policies required to disable this request
Lei Zhang 2017/04/19 19:27:25 CloudPrintSubmitEnabled doesn't belong here. It's
+ request_ =
+ net::URLFetcher::Create(0, url, request_type, this, traffic_annotation);
data_use_measurement::DataUseUserData::AttachToFetcher(
request_.get(), data_use_measurement::DataUseUserData::CLOUD_PRINT);
request_->SetRequestContext(GetRequestContextGetter());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698