Chromium Code Reviews| 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..ac7df202934d7f2cd3fb5a32b333da1971901870 100644 |
| --- a/chrome/browser/ui/passwords/account_avatar_fetcher.cc |
| +++ b/chrome/browser/ui/passwords/account_avatar_fetcher.cc |
| @@ -5,6 +5,7 @@ |
| #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" |
| @@ -12,18 +13,39 @@ |
| AccountAvatarFetcher::AccountAvatarFetcher( |
| const GURL& url, |
| const base::WeakPtr<AccountAvatarFetcherDelegate>& delegate) |
| - : fetcher_(url, this), delegate_(delegate) { |
| + : delegate_(delegate) { |
| + net::NetworkTrafficAnnotationTag traffic_annotation = |
| + net::DefineNetworkTrafficAnnotation("", R"( |
|
vasilii
2017/02/09 13:47:46
"credenential avatar"
Ramin Halavati
2017/02/09 14:22:51
Done.
|
| + semantics { |
| + sender: "" |
|
vasilii
2017/02/09 13:47:45
Chrome Password manager
Ramin Halavati
2017/02/09 14:22:51
Done.
|
| + description: "" |
|
vasilii
2017/02/09 13:47:45
Every credential saved in Chrome via the Credentia
Ramin Halavati
2017/02/09 14:22:51
Done.
|
| + trigger: "" |
|
vasilii
2017/02/09 13:47:45
User visits a site that calls navigator.credential
Ramin Halavati
2017/02/09 14:22:51
Done.
|
| + data: "" |
|
vasilii
2017/02/09 13:47:45
No outbound data.
Ramin Halavati
2017/02/09 14:22:51
Done.
|
| + destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER |
|
vasilii
2017/02/09 13:47:45
WEBSITE
Ramin Halavati
2017/02/09 14:22:51
Done.
|
| + } |
| + policy { |
| + cookies_allowed: false/true |
|
vasilii
2017/02/09 13:47:46
false
Ramin Halavati
2017/02/09 14:22:51
Done.
|
| + cookies_store_exceptions: "" |
| + setting: "" |
|
vasilii
2017/02/09 13:47:45
One can disable saving new credentials in the sett
Ramin Halavati
2017/02/09 14:22:51
Done.
|
| + policy { |
|
vasilii
2017/02/09 13:47:45
N/A
Ramin Halavati
2017/02/09 14:22:51
Done.
|
| + [POLICY_NAME] { |
| + policy_options {mode: MANDATORY/RECOMMENDED/UNSET} |
| + value: ... |
| + } |
| + } |
| + })"); |
| + fetcher_.reset(new chrome::BitmapFetcher(url, this, traffic_annotation)); |
|
vasilii
2017/02/09 13:47:46
I don't think we need a unique_ptr here. Can you c
Ramin Halavati
2017/02/09 14:22:51
The tag is now generated by net::DefineNetworkTraf
vasilii
2017/02/09 14:25:53
Right, to the anonymous namespace.
Ramin Halavati
2017/02/10 14:40:57
Done.
|
| } |
| AccountAvatarFetcher::~AccountAvatarFetcher() = default; |
| void AccountAvatarFetcher::Start( |
| net::URLRequestContextGetter* request_context) { |
| - fetcher_.Init(request_context, std::string(), |
| + fetcher_->Init(request_context, std::string(), |
| net::URLRequest::NEVER_CLEAR_REFERRER, |
| net::LOAD_DO_NOT_SEND_COOKIES | net::LOAD_DO_NOT_SAVE_COOKIES | |
| net::LOAD_DO_NOT_SEND_AUTH_DATA | net::LOAD_MAYBE_USER_GESTURE); |
| - fetcher_.Start(); |
| + fetcher_->Start(); |
| } |
| void AccountAvatarFetcher::OnFetchComplete(const GURL& /*url*/, |