Chromium Code Reviews| Index: components/ntp_tiles/icon_cacher_impl.cc |
| diff --git a/components/ntp_tiles/icon_cacher_impl.cc b/components/ntp_tiles/icon_cacher_impl.cc |
| index f8480de51e9a18affc9ec87c04dfca203339cee7..87ebb25bf301063730fee806cfd20bcf05a3db4b 100644 |
| --- a/components/ntp_tiles/icon_cacher_impl.cc |
| +++ b/components/ntp_tiles/icon_cacher_impl.cc |
| @@ -13,6 +13,7 @@ |
| #include "components/favicon_base/favicon_util.h" |
| #include "components/image_fetcher/core/image_decoder.h" |
| #include "components/image_fetcher/core/image_fetcher.h" |
| +#include "net/traffic_annotation/network_traffic_annotation.h" |
| #include "ui/base/resource/resource_bundle.h" |
| #include "ui/gfx/geometry/size.h" |
| #include "ui/gfx/image/image.h" |
| @@ -78,11 +79,30 @@ void IconCacherImpl::OnGetFaviconImageForPageURLFinished( |
| std::unique_ptr<CancelableImageCallback> preliminary_callback = |
| MaybeProvideDefaultIcon(site, preliminary_icon_available); |
| + net::NetworkTrafficAnnotationTag traffic_annotation = |
| + net::DefineNetworkTrafficAnnotation("icon_cacher", R"( |
| + semantics { |
| + sender: "Popular Sites New Tab Fetch" |
| + description: |
| + "Chrome may display a list of regionally-popular web sites on the " |
| + "New Tab Page. This service fetches icons from those sites." |
| + trigger: |
| + "Whenever a popular site would be displayed, but its icon is not " |
| + "yet cached in the browser." |
| + data: "The URL for which to retrieve a thumbnail." |
|
sfiera
2017/05/09 13:25:55
This does not fetch a thumbnail, just an icon.
e.
Ramin Halavati
2017/05/09 13:57:50
Done.
|
| + destination: WEBSITE |
| + } |
| + policy { |
| + cookies_allowed: false |
| + setting: "This feature cannot be disabled in settings." |
| + policy_exception_justification: "Not implemented." |
| + })"); |
| image_fetcher_->StartOrQueueNetworkRequest( |
| std::string(), IconURL(site), |
| base::Bind(&IconCacherImpl::OnFaviconDownloaded, base::Unretained(this), |
| site, base::Passed(std::move(preliminary_callback)), |
| - icon_available)); |
| + icon_available), |
| + traffic_annotation); |
| } |
| void IconCacherImpl::OnFaviconDownloaded( |