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

Unified Diff: net/url_request/sdch_dictionary_fetcher.cc

Issue 2849263003: Network traffic annotation added to SDCH Dictionary 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: 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..5749e20c95de6c64d62d1c98ad7f6fd46d42fb30 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,37 @@ 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("sdch_dictionary_fetch", R"(
+ semantics {
+ sender: "SDCH"
+ description:
+ "The Chrome Network Stack can use less bandwidth and reduce "
Randy Smith (Not in Mondays) 2017/05/03 12:58:42 nit: reduces. (My mistake.)
Ramin Halavati 2017/05/04 04:36:28 Done.
+ "request latency if a dictionary shared between client and server "
+ "is used to compress content on the server before sending, and "
+ "decompress content on the client after reception. This request is "
+ "fetching such a dictionary; it is dispatched when the response to "
+ "a previous URL request indicated that there was a dictionary that "
+ "the client did not currently have in memory, and could be used "
+ "for compression."
+ trigger:
+ "A response to a previous URL request indicated that this URL "
+ "contained a dictionary that could be used to compress other URL "
+ "responses."
+ data:
+ "..."
+ destination: WEBSITE
+ }
+ policy {
+ cookies_allowed: false
+ setting:
+ "This feature is disabled in Chrome and can obly be enabled in non-"
Randy Smith (Not in Mondays) 2017/05/03 12:58:43 nit: only
Ramin Halavati 2017/05/04 04:36:28 Done.
+ "Chromium embedders."
+ policy_exception_justification:
+ "Not implemented, not part of Chrome."
+ })");
+ 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;
« 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