Chromium Code Reviews| 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..dc017381e9591ae568de1003c0f0d5f6d922e6f7 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: "Content Hash Verification Job" |
|
Ramin Halavati
2017/03/11 16:05:00
Can this be 'Web Store' or 'Web Store Content Veri
Devlin
2017/03/13 20:46:25
Web Store is a bit misleading - it's not the webst
Ramin Halavati
2017/03/14 08:17:49
It doesn't need to be unique and if different anno
|
| + 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 | |