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

Unified Diff: chrome/browser/ui/passwords/account_avatar_fetcher.cc

Issue 2682263002: Network traffic annotation added to chrome::BitmapFetcher. (Closed)
Patch Set: Minor update. 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/ui/passwords/account_avatar_fetcher.cc
diff --git a/chrome/browser/ui/passwords/account_avatar_fetcher.cc b/chrome/browser/ui/passwords/account_avatar_fetcher.cc
index b12c62550f46b6439b15a334ef058efc1cdd6a47..7edd0c00ee332c31d35ba49a13a34d50d5aa2bcd 100644
--- a/chrome/browser/ui/passwords/account_avatar_fetcher.cc
+++ b/chrome/browser/ui/passwords/account_avatar_fetcher.cc
@@ -5,15 +5,49 @@
#include "chrome/browser/ui/passwords/account_avatar_fetcher.h"
#include "net/base/load_flags.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/image/image_skia_operations.h"
+namespace {
+
+constexpr net::NetworkTrafficAnnotationTag kTrafficAnnotation =
+ net::DefineNetworkTrafficAnnotation("credenential_avatar", R"(
+ semantics {
+ sender: "Chrome Password Manager"
+ description:
+ "Every credential saved in Chrome via the Credential Management "
+ "API can have an avatar URL. The URL is essentially provided by "
+ "the site calling the API. The avatar is used in the account "
+ "chooser UI and auto signin toast which appear when a site calls "
+ "navigator.credentials.get(). The avatar is retrieved before "
+ "showing the UI."
+ trigger:
+ "User visits a site that calls navigator.credentials.get(). "
+ "Assuming there are matching credentials in the Chrome password "
+ "store, the avatars are retrieved."
+ destination: WEBSITE
+ }
+ policy {
+ cookies_allowed: false
+ setting:
+ "One can disable saving new credentials in the settings (see "
+ "'Passwords and forms'). There is no setting to disable the API."
+ policy {
+ PasswordManagerEnabled {
+ policy_options {mode: MANDATORY}
+ value: false
+ }
+ }
+ })");
+
+} // namespace
+
AccountAvatarFetcher::AccountAvatarFetcher(
const GURL& url,
const base::WeakPtr<AccountAvatarFetcherDelegate>& delegate)
- : fetcher_(url, this), delegate_(delegate) {
-}
+ : fetcher_(url, this, kTrafficAnnotation), delegate_(delegate) {}
AccountAvatarFetcher::~AccountAvatarFetcher() = default;

Powered by Google App Engine
This is Rietveld 408576698