Chromium Code Reviews| Index: components/image_fetcher/core/image_data_fetcher.cc |
| diff --git a/components/image_fetcher/core/image_data_fetcher.cc b/components/image_fetcher/core/image_data_fetcher.cc |
| index 56078f7005509f873f7691bafa27b5da8432993d..df9fe24faaef1e91fb28685f271fa0e4508ef04d 100644 |
| --- a/components/image_fetcher/core/image_data_fetcher.cc |
| +++ b/components/image_fetcher/core/image_data_fetcher.cc |
| @@ -9,6 +9,7 @@ |
| #include "net/base/load_flags.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" |
| @@ -65,8 +66,30 @@ void ImageDataFetcher::FetchImageData( |
| const ImageDataFetcherCallback& callback, |
| const std::string& referrer, |
| net::URLRequest::ReferrerPolicy referrer_policy) { |
| - std::unique_ptr<net::URLFetcher> url_fetcher = net::URLFetcher::Create( |
| - next_url_fetcher_id_++, image_url, net::URLFetcher::GET, this); |
| + net::NetworkTrafficAnnotationTag traffic_annotation = |
| + net::DefineNetworkTrafficAnnotation("...", R"( |
| + semantics { |
| + sender: "..." |
|
markusheintz_
2017/05/03 09:04:07
Is there a description of the fields?
E.g. sender
|
| + description: "..." |
| + trigger: "..." |
|
markusheintz_
2017/05/03 09:04:07
What do you expect here? This list of trigger is d
|
| + data: "..." |
|
markusheintz_
2017/05/03 09:04:07
raw image data is fetch for a given URL
|
| + destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER |
|
markusheintz_
2017/05/03 09:04:07
It could be all of the options. Not sure how clien
|
| + } |
| + policy { |
| + cookies_allowed: false/true |
|
markusheintz_
2017/05/03 09:04:07
false.
|
| + cookies_store: "..." |
|
markusheintz_
2017/05/03 09:04:07
NA
|
| + setting: "..." |
|
markusheintz_
2017/05/03 09:04:07
none. clients have to do the right thing
|
| + chrome_policy { |
|
markusheintz_
2017/05/03 09:04:07
There exists no policy. It the responsibility of t
|
| + [POLICY_NAME] { |
| + policy_options {mode: MANDATORY/RECOMMENDED/UNSET} |
| + [POLICY_NAME]: ... //(value to disable it) |
| + } |
| + } |
| + policy_exception_justification: "..." |
| + })"); |
| + std::unique_ptr<net::URLFetcher> url_fetcher = |
| + net::URLFetcher::Create(next_url_fetcher_id_++, image_url, |
| + net::URLFetcher::GET, this, traffic_annotation); |
| DataUseUserData::AttachToFetcher(url_fetcher.get(), data_use_service_name_); |