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

Unified Diff: chrome/browser/extensions/install_signer.cc

Issue 2797683002: Network traffic annotation added to install_signer. (Closed)
Patch Set: Annotation updated. 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: chrome/browser/extensions/install_signer.cc
diff --git a/chrome/browser/extensions/install_signer.cc b/chrome/browser/extensions/install_signer.cc
index b73da46ffe22dff3db1697894c0b95d7ea2693c7..27117256902062969b252dad76cc30e8b59ce2cc 100644
--- a/chrome/browser/extensions/install_signer.cc
+++ b/chrome/browser/extensions/install_signer.cc
@@ -31,6 +31,7 @@
#include "crypto/secure_hash.h"
#include "crypto/sha2.h"
#include "crypto/signature_verifier.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_context_getter.h"
@@ -374,8 +375,36 @@ void InstallSigner::GetSignature(const SignatureCallback& callback) {
base::Unretained(this));
delegate_.reset(new FetcherDelegate(closure));
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("extension_install_signer", R"(
+ semantics {
+ sender: "Extension Install Signer"
+ description: "Fetches the signatures for installed extensions."
+ trigger:
+ "Chrome detects an extension that requires installation "
+ "verification."
+ data:
+ "The ids of the extensions that need to be verified, as well as a "
+ "non-revertable salted hash of the user's machine id provided by "
+ "RLZ library, which varies between different installs. This id is "
+ "only used to verify the validity of the response."
+ destination: GOOGLE_OWNED_SERVICE
+ }
+ policy {
+ cookies_allowed: true
+ cookies_store: "user"
+ setting:
+ "This feature cannot be disabled, but it is only activated if "
+ "extensions are installed."
+ chrome_policy {
+ ExtensionInstallBlacklist {
+ policy_options {mode: MANDATORY}
+ ExtensionInstallBlacklist: '*'
+ }
+ }
+ })");
url_fetcher_ = net::URLFetcher::Create(GetBackendUrl(), net::URLFetcher::POST,
- delegate_.get());
+ delegate_.get(), traffic_annotation);
url_fetcher_->SetRequestContext(context_getter_);
// The request protocol is JSON of the form:
« 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