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

Unified Diff: chrome/browser/ui/passwords/account_avatar_fetcher.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
« no previous file with comments | « chrome/browser/ui/omnibox/chrome_omnibox_client.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c842cc093e2e4bbbd292f8b4b8f2ba38c889bb02 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 Chromium 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 Chromium 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;
« no previous file with comments | « chrome/browser/ui/omnibox/chrome_omnibox_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698