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

Issue 2897293002: Adding CrHome-specific implementation for home page tile. (Closed)

Created:
3 years, 7 months ago by fhorschig
Modified:
3 years, 6 months ago
Reviewers:
mastiz, dgn
CC:
chromium-reviews, noyau+watch_chromium.org, ntp-dev+reviews_chromium.org, agrieve+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Adding CrHome-specific implementation for home page tile. This CL adds an HomePageClient for Android that is only set if the kChromeHome feature is enabled because the normal NTP has a working home button. If either kChromeHome or kPinHomePageAsTileFeature is not enabled, the MostVisited tiles will not contain the home tile. Special case: The home tile can be removed as every tile and will be blacklisted then. By explicitly enabling (or reenabling) the Homepage, the blacklisting will be undone and the tile will reappear as first tile. Removing the home tile does not disable the Homepage setting (because this setting also controls the start-up page and the home tile is not visually linked to the home page .... besides having the same URL). BUG=703994 Review-Url: https://codereview.chromium.org/2897293002 Cr-Commit-Position: refs/heads/master@{#476258} Committed: https://chromium.googlesource.com/chromium/src/+/3fc1f818eaab417801a21886ce9c293701b10486

Patch Set 1 #

Total comments: 16

Patch Set 2 : Handle empty home page urls #

Total comments: 12

Patch Set 3 : Refactor tests and initialization #

Unified diffs Side-by-side diffs Delta from patch set Stats (+209 lines, -48 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSites.java View 1 2 chunks +26 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSitesBridge.java View 1 2 4 chunks +43 lines, -1 line 0 comments Download
M chrome/browser/android/ntp/most_visited_sites_bridge.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/android/ntp/most_visited_sites_bridge.cc View 1 2 2 chunks +48 lines, -0 lines 0 comments Download
M components/ntp_tiles/most_visited_sites.h View 3 chunks +6 lines, -11 lines 0 comments Download
M components/ntp_tiles/most_visited_sites.cc View 1 2 4 chunks +10 lines, -19 lines 0 comments Download
M components/ntp_tiles/most_visited_sites_unittest.cc View 1 2 14 chunks +72 lines, -17 lines 0 comments Download

Messages

Total messages: 23 (11 generated)
fhorschig
Hi Nicholas, would you please take a look at the Android and browser part of ...
3 years, 7 months ago (2017-05-24 15:47:58 UTC) #2
fhorschig
Hi Mikel, this is the CL with the dependency I was talking about. I used ...
3 years, 7 months ago (2017-05-24 15:51:51 UTC) #4
dgn
https://codereview.chromium.org/2897293002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSites.java File chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSites.java (right): https://codereview.chromium.org/2897293002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSites.java#newcode46 chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSites.java:46: interface Client { nit: why not HomePageClient like in ...
3 years, 7 months ago (2017-05-25 10:33:33 UTC) #5
mastiz
On 2017/05/24 15:51:51, fhorschig wrote: > Hi Mikel, > this is the CL with the ...
3 years, 7 months ago (2017-05-26 08:00:54 UTC) #6
fhorschig
I added a test to verify that null home pages are handled. (And hidden) https://codereview.chromium.org/2897293002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSites.java ...
3 years, 6 months ago (2017-05-30 10:25:22 UTC) #8
fhorschig
@mastiz: Thanks for the confirmation! Would you mind having a look at the component/ and ...
3 years, 6 months ago (2017-05-30 12:53:18 UTC) #9
mastiz
https://codereview.chromium.org/2897293002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSitesBridge.java File chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSitesBridge.java (right): https://codereview.chromium.org/2897293002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSitesBridge.java#newcode33 chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSitesBridge.java:33: initializeClient(); Not that I'm against your proposal, but just ...
3 years, 6 months ago (2017-06-01 08:18:45 UTC) #10
fhorschig
https://codereview.chromium.org/2897293002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSitesBridge.java File chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSitesBridge.java (right): https://codereview.chromium.org/2897293002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSitesBridge.java#newcode33 chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSitesBridge.java:33: initializeClient(); On 2017/06/01 08:18:44, mastiz wrote: > Not that ...
3 years, 6 months ago (2017-06-01 10:12:56 UTC) #13
mastiz
LGTM. https://codereview.chromium.org/2897293002/diff/40001/components/ntp_tiles/most_visited_sites.cc File components/ntp_tiles/most_visited_sites.cc (right): https://codereview.chromium.org/2897293002/diff/40001/components/ntp_tiles/most_visited_sites.cc#newcode487 components/ntp_tiles/most_visited_sites.cc:487: !home_page_client_->GetHomepageUrl().is_empty() && On 2017/06/01 10:12:56, fhorschig wrote: > ...
3 years, 6 months ago (2017-06-01 10:59:24 UTC) #15
dgn
lgtm
3 years, 6 months ago (2017-06-01 12:22:28 UTC) #18
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/2897293002/80001
3 years, 6 months ago (2017-06-01 12:24:19 UTC) #20
commit-bot: I haz the power
3 years, 6 months ago (2017-06-01 12:28:38 UTC) #23
Message was sent while issue was closed.
Committed patchset #3 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/3fc1f818eaab417801a21886ce9c...

Powered by Google App Engine
This is Rietveld 408576698