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..ec1447abb1cafd28a15637f2a66a0ad106c89a3e 100644 |
--- a/chrome/browser/ui/passwords/account_avatar_fetcher.cc |
+++ b/chrome/browser/ui/passwords/account_avatar_fetcher.cc |
@@ -5,15 +5,45 @@ |
#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." |
+ } |
+ })"); |
+ |
+} // 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; |
@@ -32,4 +62,4 @@ void AccountAvatarFetcher::OnFetchComplete(const GURL& /*url*/, |
delegate_->UpdateAvatar(gfx::ImageSkia::CreateFrom1xBitmap(*bitmap)); |
delete this; |
-} |
+} |