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

Unified Diff: net/url_request/url_request.h

Issue 2866183003: Syntax and coverage checking added to Network Traffic Annotations. (Closed)
Patch Set: Protobuf build updated. Created 3 years, 7 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.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request.h
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index e1406f33633922e9ebc4625d62b3518b409d361c..95a26676dcaeb6b7513d8fe502ff3376351bfbb2 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -34,6 +34,7 @@
#include "net/log/net_log_with_source.h"
#include "net/proxy/proxy_server.h"
#include "net/socket/connection_attempts.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
#include "net/url_request/url_request_status.h"
#include "url/gurl.h"
#include "url/origin.h"
@@ -651,6 +652,11 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
// Returns the error status of the request.
// Do not use! Going to be protected!
const URLRequestStatus& status() const { return status_; }
+
+ const NetworkTrafficAnnotationTag& traffic_annotation() const {
+ return traffic_annotation_;
+ }
+
protected:
// Allow the URLRequestJob class to control the is_pending() flag.
void set_is_pending(bool value) { is_pending_ = value; }
@@ -686,7 +692,8 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
RequestPriority priority,
Delegate* delegate,
const URLRequestContext* context,
- NetworkDelegate* network_delegate);
+ NetworkDelegate* network_delegate,
+ NetworkTrafficAnnotationTag traffic_annotation);
// Resumes or blocks a request paused by the NetworkDelegate::OnBeforeRequest
// handler. If |blocked| is true, the request is blocked and an error page is
@@ -853,6 +860,8 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
// The raw header size of the response.
int raw_header_size_;
+ const NetworkTrafficAnnotationTag traffic_annotation_;
+
DISALLOW_COPY_AND_ASSIGN(URLRequest);
};
« no previous file with comments | « net/url_request/url_fetcher.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698