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

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..25d0d5e34d9db6880829337a8dc07add7ef041c5 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,38 @@ 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 a corp printer "
Lei Zhang 2017/04/18 19:16:41 Drop the word corp? Lots of people use Cloud Print
Ramin Halavati 2017/04/19 05:59:07 Done.
+ "without needing to add the printer to their computer"
+ trigger:
+ "Printing and running background Cloud Print services."
+ data: "..."
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER
+ }
+ policy {
+ cookies_allowed: true
Vitaly Buka (NO REVIEWS) 2017/04/18 17:32:44 ths is incorrect it sets net::LOAD_DO_NOT_SEND_COO
Ramin Halavati 2017/04/19 05:59:06 Done.
+ cookies_store: "user"
+ 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
+ }
+ }
+ })");
+ 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