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..3d1112f134ba9718b3532621a93078629b31db5e 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,43 @@ void CachedImageFetcher::FetchImageFromNetwork( |
return; |
} |
+ net::NetworkTrafficAnnotationTag traffic_annotation = |
Marc Treib
2017/05/09 13:40:36
I think this one was copied from the wrong place.
Ramin Halavati
2017/05/09 13:57:49
Acknowledged.
|
+ net::DefineNetworkTrafficAnnotation("suggestions_service_factory", R"( |
Marc Treib
2017/05/09 13:40:36
remote_suggestions_service
Ramin Halavati
2017/05/09 13:57:49
Done.
|
+ semantics { |
+ sender: "suggestions_service" |
Marc Treib
2017/05/09 13:40:36
Content Suggestion thumbnail fetch
Ramin Halavati
2017/05/09 13:57:50
Done.
|
+ description: |
+ "Retrieves thumbnails for site suggestions based on the user's " |
+ "synced browsing history, for use e.g. on the New Tab page." |
Marc Treib
2017/05/09 13:40:36
Retrieves thumbnails for content suggestions, for
Ramin Halavati
2017/05/09 13:57:50
Done.
|
+ trigger: |
+ "Triggered when a thumbnail for a suggestion is required, and no " |
+ "local thumbnail is available." |
Marc Treib
2017/05/09 13:40:36
Triggered when the user looks at a content suggest
Ramin Halavati
2017/05/09 13:57:50
Done.
|
+ data: "The URL for which to retrieve a thumbnail." |
Marc Treib
2017/05/09 13:40:36
None.
Ramin Halavati
2017/05/09 13:57:49
Done.
|
+ destination: GOOGLE_OWNED_SERVICE |
+ } |
+ policy { |
+ cookies_allowed: false |
+ setting: |
+ "Users can disable this feature by signing out of Chrome, or " |
Marc Treib
2017/05/09 13:40:36
Currently not available, but in progress: crbug.co
Ramin Halavati
2017/05/09 13:57:49
Done.
|
+ "disabling Sync or History Sync in Chrome settings under 'Advanced " |
+ "sync settings...'. The feature is enabled by default." |
+ chrome_policy { |
Marc Treib
2017/05/09 13:40:36
chrome_policy {
NTPContentSuggestionsE
Ramin Halavati
2017/05/09 13:57:50
Done.
|
+ SyncDisabled { |
+ policy_options {mode: MANDATORY} |
+ SyncDisabled: true |
+ } |
+ } |
+ chrome_policy { |
+ SigninAllowed { |
+ policy_options {mode: MANDATORY} |
+ SigninAllowed: 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( |