| Index: components/ntp_snippets/content_suggestion.h
|
| diff --git a/components/ntp_snippets/content_suggestion.h b/components/ntp_snippets/content_suggestion.h
|
| index 7879a552ab144a4cc269de0162be90ff9d648720..5bc647e4cdab112150b0dfa84a3f12d5b5858a52 100644
|
| --- a/components/ntp_snippets/content_suggestion.h
|
| +++ b/components/ntp_snippets/content_suggestion.h
|
| @@ -112,14 +112,19 @@ class ContentSuggestion {
|
| // This may be an AMP URL.
|
| const GURL& url() const { return url_; }
|
|
|
| - // The URL of a page that links to a favicon that represents the suggestion.
|
| - const GURL& url_with_favicon() const {
|
| - return url_with_favicon_.is_valid() ? url_with_favicon_ : url_;
|
| + // The URL of the page that links to a favicon that represents the suggestion.
|
| + // Path is trimmed for the URL because the current favicon server backend
|
| + // prefers it this way.
|
| + GURL url_with_favicon() const {
|
| + return url_with_favicon_.is_valid() ? GetFaviconDomain(url_with_favicon_)
|
| + : GetFaviconDomain(url_);
|
| }
|
| void set_url_with_favicon(const GURL& url_with_favicon) {
|
| url_with_favicon_ = url_with_favicon;
|
| }
|
|
|
| + static GURL GetFaviconDomain(const GURL& favicon_url);
|
| +
|
| // Title of the suggestion.
|
| const base::string16& title() const { return title_; }
|
| void set_title(const base::string16& title) { title_ = title; }
|
|
|