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

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

Issue 2888763004: Network traffic annotation added to CloudPrintUrlFetcher. (Closed)
Patch Set: nits Created 3 years, 6 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 | « chrome/service/cloud_print/cloud_print_connector.h ('k') | chrome/service/cloud_print/cloud_print_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/cloud_print/cloud_print_connector.cc
diff --git a/chrome/service/cloud_print/cloud_print_connector.cc b/chrome/service/cloud_print/cloud_print_connector.cc
index b9dd7409ce21d8c6b0bbf251ed89e96517edaadc..5bfd52554a872cd5acd93d7fe07687c6486cccd9 100644
--- a/chrome/service/cloud_print/cloud_print_connector.cc
+++ b/chrome/service/cloud_print/cloud_print_connector.cc
@@ -24,15 +24,19 @@
#include "chrome/grit/generated_resources.h"
#include "chrome/service/cloud_print/cloud_print_service_helpers.h"
#include "net/base/mime_util.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
#include "ui/base/l10n/l10n_util.h"
namespace cloud_print {
-CloudPrintConnector::CloudPrintConnector(Client* client,
- const ConnectorSettings& settings)
- : client_(client),
- next_response_handler_(NULL),
- stats_ptr_factory_(this) {
+CloudPrintConnector::CloudPrintConnector(
+ Client* client,
+ const ConnectorSettings& settings,
+ const net::PartialNetworkTrafficAnnotationTag& partial_traffic_annotation)
+ : client_(client),
+ next_response_handler_(NULL),
+ partial_traffic_annotation_(partial_traffic_annotation),
+ stats_ptr_factory_(this) {
settings_.CopyFrom(settings);
}
@@ -336,7 +340,7 @@ void CloudPrintConnector::StartGetRequest(const GURL& url,
int max_retries,
ResponseHandler handler) {
next_response_handler_ = handler;
- request_ = CloudPrintURLFetcher::Create();
+ request_ = CloudPrintURLFetcher::Create(partial_traffic_annotation_);
request_->StartGetRequest(CloudPrintURLFetcher::REQUEST_UPDATE_JOB,
url, this, max_retries, std::string());
}
@@ -349,7 +353,7 @@ void CloudPrintConnector::StartPostRequest(
const std::string& post_data,
ResponseHandler handler) {
next_response_handler_ = handler;
- request_ = CloudPrintURLFetcher::Create();
+ request_ = CloudPrintURLFetcher::Create(partial_traffic_annotation_);
request_->StartPostRequest(
type, url, this, max_retries, mime_type, post_data, std::string());
}
@@ -366,7 +370,8 @@ void CloudPrintConnector::ReportUserMessage(const std::string& message_id,
net::AddMultipartFinalDelimiterForUpload(mime_boundary, &post_data);
std::string mime_type("multipart/form-data; boundary=");
mime_type += mime_boundary;
- user_message_request_ = CloudPrintURLFetcher::Create();
+ user_message_request_ =
+ CloudPrintURLFetcher::Create(partial_traffic_annotation_);
user_message_request_->StartPostRequest(
CloudPrintURLFetcher::REQUEST_USER_MESSAGE, url, this, 1, mime_type,
post_data, std::string());
« no previous file with comments | « chrome/service/cloud_print/cloud_print_connector.h ('k') | chrome/service/cloud_print/cloud_print_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698