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

Unified Diff: net/url_request/sdch_dictionary_fetcher.cc

Issue 2846873002: Network traffic annotation added to URLFetcher. (Closed)
Patch Set: 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
Index: net/url_request/sdch_dictionary_fetcher.cc
diff --git a/net/url_request/sdch_dictionary_fetcher.cc b/net/url_request/sdch_dictionary_fetcher.cc
index e51d9581a055c4bffc637d03564cd89b4a5f7305..11d11666462cfe8a16a832e4da1bfc420972acd5 100644
--- a/net/url_request/sdch_dictionary_fetcher.cc
+++ b/net/url_request/sdch_dictionary_fetcher.cc
@@ -19,6 +19,7 @@
#include "net/http/http_response_headers.h"
#include "net/log/net_log_event_type.h"
#include "net/log/net_log_with_source.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
#include "net/url_request/redirect_info.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_status.h"
@@ -278,7 +279,28 @@ int SdchDictionaryFetcher::DoSendRequest(int rv) {
FetchInfo info;
bool success = fetch_queue_->Pop(&info);
DCHECK(success);
- current_request_ = context_->CreateRequest(info.url, IDLE, this);
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("...", R"(
+ semantics {
+ sender: "..."
+ description: "..."
+ trigger: "..."
+ data: "..."
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER/LOCAL
+ }
+ policy {
+ cookies_allowed: false
+ setting: "..."
+ chrome_policy {
+ [POLICY_NAME] {
+ policy_options {mode: MANDATORY/RECOMMENDED/UNSET}
+ [POLICY_NAME]: ... //(value to disable it)
+ }
+ }
+ policy_exception_justification: "..."
+ })");
+ current_request_ =
+ context_->CreateRequest(info.url, IDLE, this, traffic_annotation);
int load_flags = LOAD_DO_NOT_SEND_COOKIES | LOAD_DO_NOT_SAVE_COOKIES;
if (info.cache_only)
load_flags |= LOAD_ONLY_FROM_CACHE | LOAD_SKIP_CACHE_VALIDATION;

Powered by Google App Engine
This is Rietveld 408576698