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

Unified Diff: net/url_request/url_request_context.h

Issue 2421333002: Protobuf for Traffic Annotation and first use by a URLFetcher. (Closed)
Patch Set: More comments added. 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 | « net/url_request/url_fetcher.cc ('k') | net/url_request/url_request_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_context.h
diff --git a/net/url_request/url_request_context.h b/net/url_request/url_request_context.h
index 8aeb1e01205557da5b9c03a59bb51c1d6654cbe8..9551e4268caf90a1af06d0de4d666060703cbdd6 100644
--- a/net/url_request/url_request_context.h
+++ b/net/url_request/url_request_context.h
@@ -23,6 +23,7 @@
#include "net/http/http_server_properties.h"
#include "net/http/transport_security_state.h"
#include "net/ssl/ssl_config_service.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
#include "net/url_request/url_request.h"
namespace base {
@@ -71,14 +72,28 @@ class NET_EXPORT URLRequestContext
// session.
const HttpNetworkSession::Params* GetNetworkSessionParams() const;
+ // This function should not be used in Chromium, please use the version with
+ // NetworkTrafficAnnotationTag in the future.
std::unique_ptr<URLRequest> CreateRequest(
const GURL& url,
RequestPriority priority,
URLRequest::Delegate* delegate) const;
- NetLog* net_log() const {
- return net_log_;
- }
+ // |traffic_annotation| is metadata about the network traffic send via this
+ // URLRequest, see net::DefineNetworkTrafficAnnotation. Note that:
+ // - net provides the API for tagging requests with an opaque identifier.
+ // - tools/traffic_annotation/traffic_annotation.proto contains the Chrome
+ // specific .proto describing the verbose annotation format that Chrome's
+ // callsites are expected to follow.
+ // - tools/traffic_annotation/ contains sample and template for annotation and
+ // tools will be added for verification following crbug.com/690323.
+ std::unique_ptr<URLRequest> CreateRequest(
+ const GURL& url,
+ RequestPriority priority,
+ URLRequest::Delegate* delegate,
+ NetworkTrafficAnnotationTag traffic_annotation) const;
+
+ NetLog* net_log() const { return net_log_; }
void set_net_log(NetLog* net_log) {
net_log_ = net_log;
« no previous file with comments | « net/url_request/url_fetcher.cc ('k') | net/url_request/url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698