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

Unified Diff: net/url_request/sdch_dictionary_fetcher.cc

Issue 2849263003: Network traffic annotation added to SDCH Dictionary Fetcher. (Closed)
Patch Set: Comments addressed. 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 | « 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..1a3476612a77539bfe1435d708378fe1dcb2709a 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,38 @@ 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 reduces "
+ "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:
+ "The URL of the dictionary, as specified in a previous response "
+ "from a server."
+ destination: WEBSITE
+ }
+ policy {
+ cookies_allowed: false
+ setting:
+ "This feature is disabled in Chrome and can only be enabled in non-"
+ "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