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

Unified Diff: extensions/browser/content_hash_fetcher.cc

Issue 2728313002: Network traffic annotation added to content_hash_fetcher.cc. (Closed)
Patch Set: Annotation assigned. Created 3 years, 9 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: extensions/browser/content_hash_fetcher.cc
diff --git a/extensions/browser/content_hash_fetcher.cc b/extensions/browser/content_hash_fetcher.cc
index 1f73cb626c7454f4e82661f58cb9ce8b329f846d..61dc6c69687d9c801a7e9ac2a919eac2a5f2d5b1 100644
--- a/extensions/browser/content_hash_fetcher.cc
+++ b/extensions/browser/content_hash_fetcher.cc
@@ -31,6 +31,7 @@
#include "extensions/common/extension.h"
#include "extensions/common/file_util.h"
#include "net/base/load_flags.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_fetcher_delegate.h"
#include "net/url_request/url_request_status.h"
@@ -240,8 +241,28 @@ void ContentHashFetcherJob::DoneCheckingForVerifiedContents(bool found) {
} else {
VLOG(1) << "Missing verified contents for " << extension_id_
<< ", fetching...";
- url_fetcher_ =
- net::URLFetcher::Create(fetch_url_, net::URLFetcher::GET, this);
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("...", R"(
Devlin 2017/03/11 03:17:13 ContentHashVerificationJob
Ramin Halavati 2017/03/11 16:04:59 Done.
+ semantics {
+ sender: "..."
Devlin 2017/03/11 03:17:13 ContentHashFetcherJob
Ramin Halavati 2017/03/11 16:05:00 Done.
+ description: "..."
Devlin 2017/03/11 03:17:13 The request sent to retrieve the verified_contents
Ramin Halavati 2017/03/11 16:05:00 Done.
+ trigger: "..."
Devlin 2017/03/11 03:17:13 An extension from the webstore is missing the veri
Ramin Halavati 2017/03/11 16:05:00 Done.
+ data: "..."
Devlin 2017/03/11 03:17:13 The extension id and extension version.
Ramin Halavati 2017/03/11 16:04:59 Done.
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER
+ }
+ policy {
+ cookies_allowed: false
+ setting: "..."
Devlin 2017/03/11 03:17:13 This feature cannot be directly disabled; it is en
Ramin Halavati 2017/03/11 16:05:00 Done.
+ policy {
+ [POLICY_NAME] {
+ policy_options {mode: MANDATORY/RECOMMENDED/UNSET}
+ [POLICY_NAME]: ... //(value to disable it)
+ }
+ }
+ policy_exception_justification: "..."
Devlin 2017/03/11 03:17:13 This policy only takes effect if the user has exte
Ramin Halavati 2017/03/11 16:04:59 Done.
+ })");
+ url_fetcher_ = net::URLFetcher::Create(fetch_url_, net::URLFetcher::GET,
+ this, traffic_annotation);
url_fetcher_->SetRequestContext(request_context_);
url_fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES |
net::LOAD_DO_NOT_SAVE_COOKIES |
« 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