Chromium Code Reviews| Index: components/search_provider_logos/logo_tracker.cc |
| diff --git a/components/search_provider_logos/logo_tracker.cc b/components/search_provider_logos/logo_tracker.cc |
| index d5e10a61eb8fd4e8cb6a6de796f4fbf58123c807..b72ed7043a364713547302e161e9eb2db1b07285 100644 |
| --- a/components/search_provider_logos/logo_tracker.cc |
| +++ b/components/search_provider_logos/logo_tracker.cc |
| @@ -17,6 +17,7 @@ |
| #include "components/search_provider_logos/switches.h" |
| #include "net/http/http_response_headers.h" |
| #include "net/http/http_status_code.h" |
| +#include "net/traffic_annotation/network_traffic_annotation.h" |
| #include "net/url_request/url_fetcher.h" |
| #include "net/url_request/url_request_context_getter.h" |
| #include "net/url_request/url_request_status.h" |
| @@ -226,7 +227,29 @@ void LogoTracker::FetchLogo() { |
| logo_url_, fingerprint, wants_cta_, transparent_); |
| } |
| - fetcher_ = net::URLFetcher::Create(url, net::URLFetcher::GET, this); |
| + net::NetworkTrafficAnnotationTag traffic_annotation = |
| + net::DefineNetworkTrafficAnnotation("logo_tracker", R"( |
| + semantics { |
| + sender: "Logo Tracker" |
| + description: |
| + "Provides the logo image for a search provider (e.g. Google or " |
| + "Yahoo!)." |
| + trigger: "Displaying the new tab page on iOS or Android." |
| + data: "Link to logo image and metadata." |
|
Marc Treib
2017/02/27 09:52:59
Wait, if I interpret the proto description correct
Ramin Halavati
2017/02/27 10:04:30
Yes, this is what Chrome sends, so is the current
Marc Treib
2017/02/27 10:12:47
The current formulation refers to what Chrome rece
Ramin Halavati
2017/02/27 10:16:54
Done, in case cookies are not required, I can crea
Marc Treib
2017/02/27 10:23:02
The problem is, I'm not sure how we could properly
justincohen
2017/02/27 14:20:10
I see, 'send' is just metadata in this case. What
|
| + destination: OTHER |
| + } |
| + policy { |
| + cookies_allowed: true |
| + cookies_store: "user" |
| + setting: |
| + "Choosing a non-Google search engine in Chromium settings under " |
| + "'Search Engine' will disable this feature." |
| + policy_exception_justification: |
| + "Not implemented, considered not useful as it does not upload any" |
| + "data and just downloads a logo image." |
| + })"); |
| + fetcher_ = net::URLFetcher::Create(url, net::URLFetcher::GET, this, |
| + traffic_annotation); |
| fetcher_->SetRequestContext(request_context_getter_.get()); |
| data_use_measurement::DataUseUserData::AttachToFetcher( |
| fetcher_.get(), |