Chromium Code Reviews| Index: chrome/browser/search/thumbnail_source.cc |
| diff --git a/chrome/browser/search/thumbnail_source.cc b/chrome/browser/search/thumbnail_source.cc |
| index 95bfd6a20304832514dab7b46a89b776bc0adfb6..95fa3f5835d40c95cf784600506a5849bcffe778 100644 |
| --- a/chrome/browser/search/thumbnail_source.cc |
| +++ b/chrome/browser/search/thumbnail_source.cc |
| @@ -11,9 +11,36 @@ |
| #include "chrome/browser/thumbnails/thumbnail_service.h" |
| #include "chrome/browser/thumbnails/thumbnail_service_factory.h" |
| #include "chrome/common/url_constants.h" |
| +#include "net/traffic_annotation/network_traffic_annotation.h" |
| #include "net/url_request/url_request.h" |
| #include "url/gurl.h" |
| +namespace { |
| + |
| +constexpr net::NetworkTrafficAnnotationTag kTrafficAnnotation = |
| + net::DefineNetworkTrafficAnnotation("...", R"( |
|
Marc Treib
2017/05/09 09:43:47
thumbnail_source
Ramin Halavati
2017/05/09 11:08:24
Done.
|
| + semantics { |
| + sender: "..." |
|
Marc Treib
2017/05/09 09:43:47
ThumbnailSource
Ramin Halavati
2017/05/09 11:08:24
Done.
|
| + description: "..." |
|
Marc Treib
2017/05/09 09:43:47
Retrieves thumbnails for site suggestions based on
Ramin Halavati
2017/05/09 11:08:24
Done.
|
| + trigger: "..." |
|
Marc Treib
2017/05/09 09:43:47
Triggered when a thumbnail for a suggestion is req
Ramin Halavati
2017/05/09 11:08:24
Done.
|
| + data: "..." |
|
Marc Treib
2017/05/09 09:43:47
None.
Ramin Halavati
2017/05/09 11:08:24
Doesn't it sent the URL to that thumbnail? Isn't i
Marc Treib
2017/05/09 11:38:34
Right, the request URL includes the URL of the pag
Ramin Halavati
2017/05/09 13:16:47
Done.
|
| + destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER/LOCAL |
|
Ramin Halavati
2017/05/09 11:08:24
GOOGLE_OWNED_SERVICE?
Marc Treib
2017/05/09 11:38:34
Yes. Sorry, missed that one.
Ramin Halavati
2017/05/09 13:16:47
Done.
|
| + } |
| + policy { |
| + cookies_allowed: false/true |
|
Marc Treib
2017/05/09 09:43:47
false
Ramin Halavati
2017/05/09 11:08:24
Done.
|
| + cookies_store: "..." |
| + setting: "..." |
|
Marc Treib
2017/05/09 09:43:47
Same here: Cannot be disabled individually, but us
Ramin Halavati
2017/05/09 13:16:47
Done.
|
| + chrome_policy { |
| + [POLICY_NAME] { |
| + policy_options {mode: MANDATORY/RECOMMENDED/UNSET} |
| + [POLICY_NAME]: ... //(value to disable it) |
| + } |
| + } |
| + policy_exception_justification: "..." |
| + })"); |
| + |
| +} // namespace |
| + |
| // The delimiter between the first url and the fallback url passed to |
| // StartDataRequest. |
| const char kUrlDelimiter[] = "?fb="; |
| @@ -22,7 +49,7 @@ const char kUrlDelimiter[] = "?fb="; |
| ThumbnailSource::ThumbnailSource(Profile* profile, bool capture_thumbnails) |
| : thumbnail_service_(ThumbnailServiceFactory::GetForProfile(profile)), |
| capture_thumbnails_(capture_thumbnails), |
| - image_data_fetcher_(profile->GetRequestContext()), |
| + image_data_fetcher_(profile->GetRequestContext(), kTrafficAnnotation), |
| weak_ptr_factory_(this) {} |
| ThumbnailSource::~ThumbnailSource() = default; |