Chromium Code Reviews| Index: components/ntp_tiles/popular_sites_impl.cc |
| diff --git a/components/ntp_tiles/popular_sites_impl.cc b/components/ntp_tiles/popular_sites_impl.cc |
| index 566202b07d88c8cc228312ce4c98dbf0a5776b03..7340d44b4303660b4557bff155ff4091f88287c1 100644 |
| --- a/components/ntp_tiles/popular_sites_impl.cc |
| +++ b/components/ntp_tiles/popular_sites_impl.cc |
| @@ -31,6 +31,7 @@ |
| #include "components/variations/variations_associated_data.h" |
| #include "net/base/load_flags.h" |
| #include "net/http/http_status_code.h" |
| +#include "net/traffic_annotation/network_traffic_annotation.h" |
| #if defined(OS_ANDROID) || defined(OS_IOS) |
| #include "base/json/json_reader.h" |
| @@ -306,7 +307,28 @@ void PopularSitesImpl::RegisterProfilePrefs( |
| } |
| void PopularSitesImpl::FetchPopularSites() { |
| - fetcher_ = URLFetcher::Create(pending_url_, URLFetcher::GET, this); |
| + net::NetworkTrafficAnnotationTag traffic_annotation = |
| + net::DefineNetworkTrafficAnnotation("popular_sites_fetch", R"( |
| + semantics { |
| + sender: "Popular Sites New Tab Fetch" |
| + description: |
| + "Google Chrome may display a list of regionally-popular web sites " |
| + "on the New Tab Page. This service fetches the list of these sites." |
| + trigger: |
| + "Once per day, unless no popular web sites are required because " |
| + "the New Tab Page is filled with suggestions based on the user's" |
|
battre
2017/02/22 10:44:05
nit: space missing before "
Ramin Halavati
2017/02/22 12:26:48
Done.
|
| + "browsing history." |
| + data: "A two letter country code based on the user's location." |
| + destination: GOOGLE_OWNED_SERVICE |
| + } |
| + policy { |
| + cookies_allowed: false |
| + setting: "This feature cannot be disabled in settings." |
| + policy_exception_justification: |
| + "Not implemented, considered not useful?" |
|
battre
2017/02/22 10:44:05
remove the ? - we can still evaluate that later.
Ramin Halavati
2017/02/22 12:26:48
Done.
|
| + })"); |
| + fetcher_ = URLFetcher::Create(pending_url_, URLFetcher::GET, this, |
| + traffic_annotation); |
| data_use_measurement::DataUseUserData::AttachToFetcher( |
| fetcher_.get(), data_use_measurement::DataUseUserData::NTP_TILES); |
| fetcher_->SetRequestContext(download_context_); |