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

Unified Diff: extensions/browser/content_hash_fetcher.cc

Issue 2728313002: Network traffic annotation added to content_hash_fetcher.cc. (Closed)
Patch Set: Annotation updated. 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..819b51fd9245df1d70d4613458c2bfba226269fd 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,32 @@ 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("content_hash_verification_job", R"(
+ semantics {
+ sender: "Web Store Content Verification"
+ description:
+ "The request sent to retrieve the file required for content "
+ "verification for an extension from the Web Store."
+ trigger:
+ "An extension from the Web Store is missing the "
+ "verified_contents.json file required for extension content "
+ "verification."
+ data: "The extension id and extension version."
+ destination: GOOGLE_OWNED_SERVICE
+ }
+ policy {
+ cookies_allowed: false
+ setting:
+ "This feature cannot be directly disabled; it is enabled if any "
+ "extension from the webstore is installed in the browser."
+ policy_exception_justification:
+ "Not implemented, not required. If the user has extensions from "
+ "the Web Store, this feature is required to ensure the "
+ "extensions match what is distributed by the store."
+ })");
+ 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