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

Unified Diff: chrome/browser/profiles/profile_avatar_downloader.cc

Issue 2682263002: Network traffic annotation added to chrome::BitmapFetcher. (Closed)
Patch Set: nits 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/profiles/profile_avatar_downloader.cc
diff --git a/chrome/browser/profiles/profile_avatar_downloader.cc b/chrome/browser/profiles/profile_avatar_downloader.cc
index 6bfb7a882494c0cb9e2e0fdaae5ec4176017af7d..e3647a0c2f3ab30c34eac974593ff8005dc3239f 100644
--- a/chrome/browser/profiles/profile_avatar_downloader.cc
+++ b/chrome/browser/profiles/profile_avatar_downloader.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_avatar_icon_util.h"
#include "net/base/load_flags.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
#include "ui/gfx/image/image.h"
namespace {
@@ -27,7 +28,28 @@ ProfileAvatarDownloader::ProfileAvatarDownloader(
DCHECK(!callback_.is_null());
GURL url(std::string(kHighResAvatarDownloadUrlPrefix) +
profiles::GetDefaultAvatarIconFileNameAtIndex(icon_index));
- fetcher_.reset(new chrome::BitmapFetcher(url, this));
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("profile_avatar", R"(
+ semantics {
+ sender: "Profile Avatar Downloader"
+ description:
+ "The Chromium binary comes with a bundle of low-resolution "
+ "versions of avatar images. When the user selects an avatar in "
+ "chrome://settings, Chromium will download a high-resolution "
+ "version from Google's static content servers for use in the "
+ "people manager UI."
+ trigger:
+ "User selects a new avatar in chrome://settings for their profile"
+ data: "None, only the filename of the png to download."
+ destination: GOOGLE_OWNED_SERVICE
+ }
+ policy {
+ cookies_allowed: false
+ policy_exception_justification:
+ "No content is being uploaded or saved; this request merely "
+ "downloads a publicly available PNG file."
+ })");
+ fetcher_.reset(new chrome::BitmapFetcher(url, this, traffic_annotation));
}
ProfileAvatarDownloader::~ProfileAvatarDownloader() {
« no previous file with comments | « chrome/browser/extensions/webstore_install_helper.cc ('k') | chrome/browser/ui/omnibox/chrome_omnibox_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698