Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Unified Diff: components/ntp_snippets/content_suggestion.h

Issue 2824173005: [Content suggestions] Reveal URL with favicon in snippets-internals (Closed)
Patch Set: Vitalii's comments #2 Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..dca3c24367a3b8e319aa307a9d3d555685a75b27 100644
--- a/components/ntp_snippets/content_suggestion.h
+++ b/components/ntp_snippets/content_suggestion.h
@@ -112,9 +112,12 @@ 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() ? url_with_favicon_.GetWithEmptyPath()
+ : url_.GetWithEmptyPath();
}
void set_url_with_favicon(const GURL& url_with_favicon) {
url_with_favicon_ = url_with_favicon;
« no previous file with comments | « chrome/browser/ui/webui/snippets_internals_message_handler.cc ('k') | components/ntp_snippets/content_suggestions_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698