Chromium Code Reviews| Index: components/ntp_snippets/remote/remote_suggestions_provider_impl.cc |
| diff --git a/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc b/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc |
| index 2c637e3a57a4baf5102d99f2e708a42962745eac..c9d1e2c183205a90e606f6628ff876a43cb17677 100644 |
| --- a/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc |
| +++ b/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc |
| @@ -33,6 +33,7 @@ |
| #include "components/prefs/pref_service.h" |
| #include "components/strings/grit/components_strings.h" |
| #include "components/variations/variations_associated_data.h" |
| +#include "net/traffic_annotation/network_traffic_annotation.h" |
| #include "ui/gfx/geometry/size.h" |
| #include "ui/gfx/image/image.h" |
| @@ -288,10 +289,34 @@ void CachedImageFetcher::FetchImageFromNetwork( |
| return; |
| } |
| + net::NetworkTrafficAnnotationTag traffic_annotation = |
| + net::DefineNetworkTrafficAnnotation("remote_suggestions_service", R"( |
|
Marc Treib
2017/05/09 14:08:19
Sorry, this should be remote_suggestions_provider
Ramin Halavati
2017/05/10 05:41:02
Done.
|
| + semantics { |
| + sender: "Content Suggestion Thumbnail Fetch" |
| + description: |
| + "Retrieves thumbnails for content suggestions, for display on the " |
| + "New Tab page or Chrome Home." |
| + trigger: |
| + "Triggered when the user looks at a content suggestion (and its " |
| + "thumbnail isn't cached yet)." |
| + data: "None." |
| + destination: GOOGLE_OWNED_SERVICE |
| + } |
| + policy { |
| + cookies_allowed: false |
| + setting: "Currently not available, but in progress: crbug.com/703684" |
| + chrome_policy { |
| + NTPContentSuggestionsEnabled { |
| + policy_options {mode: MANDATORY} |
| + NTPContentSuggestionsEnabled: false |
| + } |
| + } |
| + })"); |
| image_fetcher_->StartOrQueueNetworkRequest( |
| suggestion_id.id_within_category(), url, |
| base::Bind(&CachedImageFetcher::OnImageDecodingDone, |
| - base::Unretained(this), callback)); |
| + base::Unretained(this), callback), |
| + traffic_annotation); |
| } |
| RemoteSuggestionsProviderImpl::RemoteSuggestionsProviderImpl( |