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

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

Issue 2682263002: Network traffic annotation added to chrome::BitmapFetcher. (Closed)
Patch Set: Minor correction. Created 3 years, 10 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
Index: chrome/browser/extensions/webstore_install_helper.cc
diff --git a/chrome/browser/extensions/webstore_install_helper.cc b/chrome/browser/extensions/webstore_install_helper.cc
index 691ec84901659706c6e3008c225f0e0a39aa91f8..a72a4e70b67dc8b0841c621b3edecee228bc800e 100644
--- a/chrome/browser/extensions/webstore_install_helper.cc
+++ b/chrome/browser/extensions/webstore_install_helper.cc
@@ -10,6 +10,7 @@
#include "components/safe_json/safe_json_parser.h"
#include "content/public/browser/browser_thread.h"
#include "net/base/load_flags.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
#include "net/url_request/url_request.h"
using content::BrowserThread;
@@ -53,7 +54,38 @@ void WebstoreInstallHelper::Start() {
// No existing |icon_fetcher_| to avoid unbalanced AddRef().
CHECK(!icon_fetcher_.get());
AddRef(); // Balanced in OnFetchComplete().
- icon_fetcher_.reset(new chrome::BitmapFetcher(icon_url_, this));
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("webstore_install_helper", R"(
+ semantics {
+ sender: "Webstore Install Helper"
+ description:
+ "Fetches the bitmap corresponding to an extension icon."
+ trigger:
+ "This can happen in a few different circumstances: "
+ "1-User initiated an install from the Chrome Web Store."
+ "2-User initiated an inline installation from another website."
+ "3-...Something with kiosk apps - maybe steel@ knows more about "
tbarzic 2017/02/14 21:24:57 Loading of kiosk app data on Chrome OS (provided t
Ramin Halavati 2017/02/15 11:52:02 Done.
+ "that one."
+ data:
+ "The url of the icon for the extension, which includes the "
+ "extension id."
+ destination: GOOGLE_OWNED_SERVICE
+ }
+ policy {
+ cookies_allowed: false
+ setting:
+ "There's no direct Chrome setting to disable this, but you could "
+ "uninstall all extensions and not install (or begin the "
+ "installation flow for) any more."
+ policy {
+ [POLICY_NAME] {
+ policy_options {mode: MANDATORY/RECOMMENDED/UNSET}
+ value: ...
+ }
+ }
+ })");
+ icon_fetcher_.reset(
+ new chrome::BitmapFetcher(icon_url_, this, traffic_annotation));
icon_fetcher_->Init(
context_getter_, std::string(),
net::URLRequest::CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE,

Powered by Google App Engine
This is Rietveld 408576698