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

Issue 2593573003: Ntp: use AMP urls for content suggestions when available. (Closed)

Created:
4 years ago by Michael van Ouwerkerk
Modified:
4 years ago
CC:
chromium-reviews, arv+watch_chromium.org, ntp-dev+reviews_chromium.org, agrieve+watch_chromium.org, Marc Treib
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Ntp: use AMP urls for content suggestions when available. Controlled by the NTPPreferAmpUrls feature, enabled by default. BUG=668095 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/ee93200f104433b9637d0f5688ba46ec21439098 Cr-Commit-Position: refs/heads/master@{#439838}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Fix tests. #

Total comments: 10

Patch Set 3 : Address review comments from bauerb. #

Patch Set 4 : Address review comments by vitalii. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -50 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java View 1 2 3 3 chunks +3 lines, -8 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerViewTest.java View 1 3 chunks +3 lines, -4 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/ntp/snippets/ArticleSnippetsTest.java View 4 chunks +0 lines, -4 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/ContentSuggestionsTestUtils.java View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapterTest.java View 1 3 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/android/ntp/ntp_snippets_bridge.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/resources/snippets_internals.html View 2 chunks +0 lines, -10 lines 0 comments Download
M chrome/browser/ui/webui/snippets_internals_message_handler.cc View 1 chunk +0 lines, -1 line 0 comments Download
M components/ntp_snippets/content_suggestion.h View 1 2 3 2 chunks +2 lines, -8 lines 0 comments Download
M components/ntp_snippets/features.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M components/ntp_snippets/features.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M components/ntp_snippets/remote/ntp_snippet.h View 1 chunk +3 lines, -0 lines 0 comments Download
M components/ntp_snippets/remote/remote_suggestions_provider.cc View 1 chunk +6 lines, -2 lines 0 comments Download
M components/ntp_snippets/remote/remote_suggestions_provider_unittest.cc View 3 chunks +0 lines, -3 lines 0 comments Download

Messages

Total messages: 30 (18 generated)
Michael van Ouwerkerk
Bernhard, could you take a look please?
4 years ago (2016-12-20 15:33:08 UTC) #5
Bernhard Bauer
Nice, LGTM! +Marc FYI https://codereview.chromium.org/2593573003/diff/1/components/ntp_snippets/features.cc File components/ntp_snippets/features.cc (right): https://codereview.chromium.org/2593573003/diff/1/components/ntp_snippets/features.cc#newcode44 components/ntp_snippets/features.cc:44: const base::Feature kPreferAmpUrlsFeature{"NTPPreferAmpUrls", Nit: If ...
4 years ago (2016-12-20 15:42:49 UTC) #6
Michael van Ouwerkerk
https://codereview.chromium.org/2593573003/diff/1/components/ntp_snippets/features.cc File components/ntp_snippets/features.cc (right): https://codereview.chromium.org/2593573003/diff/1/components/ntp_snippets/features.cc#newcode44 components/ntp_snippets/features.cc:44: const base::Feature kPreferAmpUrlsFeature{"NTPPreferAmpUrls", On 2016/12/20 15:42:49, Bernhard Bauer wrote: ...
4 years ago (2016-12-20 15:51:00 UTC) #9
vitaliii
Drive-by nits. https://codereview.chromium.org/2593573003/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java (left): https://codereview.chromium.org/2593573003/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java#oldcode31 chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java:31: public final String mUrl; I would add ...
4 years ago (2016-12-20 15:51:46 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2593573003/40001
4 years ago (2016-12-20 15:51:51 UTC) #14
Michael van Ouwerkerk
https://codereview.chromium.org/2593573003/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java (left): https://codereview.chromium.org/2593573003/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java#oldcode31 chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java:31: public final String mUrl; On 2016/12/20 15:51:46, vitaliii wrote: ...
4 years ago (2016-12-20 16:12:48 UTC) #16
vitaliii
LGTM. https://codereview.chromium.org/2593573003/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java (left): https://codereview.chromium.org/2593573003/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java#oldcode54 chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java:54: /** To be run when the offline status ...
4 years ago (2016-12-20 16:35:12 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2593573003/60001
4 years ago (2016-12-20 16:54:03 UTC) #23
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years ago (2016-12-20 17:42:25 UTC) #26
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/ee93200f104433b9637d0f5688ba46ec21439098 Cr-Commit-Position: refs/heads/master@{#439838}
4 years ago (2016-12-20 17:44:39 UTC) #28
jkrcal
On 2016/12/20 17:44:39, commit-bot: I haz the power wrote: > Patchset 4 (id:??) landed as ...
4 years ago (2016-12-21 07:17:14 UTC) #29
Michael van Ouwerkerk
4 years ago (2016-12-21 10:29:09 UTC) #30
Message was sent while issue was closed.
On 2016/12/21 07:17:14, jkrcal wrote:
> On 2016/12/20 17:44:39, commit-bot: I haz the power wrote:
> > Patchset 4 (id:??) landed as
> > https://crrev.com/ee93200f104433b9637d0f5688ba46ec21439098
> > Cr-Commit-Position: refs/heads/master@{#439838}
> 
> I am bit frustrated. Was it not mentioned in a recent meeting that this breaks
> favicon fetching for amp articles?
>  (which still happens on java side, based on the url of the article)
> 
> My CLs to move it to the c++ side are in the works, hope to land it before M57
> BP but I am not sure :|

Sorry Jan. I remember you mentioning it, and I did check both the code path and
the final user experience. I saw no failures and no technical reason for why it
would fail, though this may depend on the data. Basically, all the AMP urls I
saw just used the regular publisher domain, and they had a favicon. Let's talk
about what might be broken, and what we might do about it.

Powered by Google App Engine
This is Rietveld 408576698