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

Issue 2457033003: Add chrome://popular-sites-internals/ to iOS. (Closed)

Created:
4 years, 1 month ago by sfiera
Modified:
4 years, 1 month ago
CC:
arv+watch_chromium.org, Bernhard Bauer, blundell+watchlist_chromium.org, chromium-reviews, droger+watchlist_chromium.org, ntp-dev+reviews_chromium.org, oshima+watch_chromium.org, sdefresne+watchlist_chromium.org, sdefresne+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add chrome://popular-sites-internals/ to iOS. Move the resources and the bulk of the implementation into //components/ntp_tiles. Leave behind the glue code for //content and add the corresponding glue for iOS. Some notes: * I couldn't figure out how to use gzipped resources for iOS, so I had to disable gzip on the resources. * The HTML is now flattened; this handles the <if/> tags. Apparently they were passed through to the browser before, which renders them ineffective. * The handler is not enabled on iOS yet; that's downstream. This amounts to a ~3K blowup on Android (it was probably ~2K compressed and ~5K now). There's probably some extra savings because I think grit minifies the JS. BUG=659955 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/7713f244a63217c94cef663b5dbd153d00e7cdb6 Cr-Commit-Position: refs/heads/master@{#429310}

Patch Set 1 #

Patch Set 2 : Add OWNERS for ntp_tiles.grdp. #

Patch Set 3 : Inline message handler impl. #

Total comments: 27

Patch Set 4 : Docs and rename. #

Patch Set 5 : Restrict grit resources to is_{android,ios}. #

Patch Set 6 : Lengthen file name. #

Total comments: 2

Patch Set 7 : Further unify handlers. #

Patch Set 8 : Minimize ios/content diff. #

Total comments: 4

Patch Set 9 : Break out ...Client. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+426 lines, -500 lines) Patch
M chrome/browser/android/ntp/most_visited_sites_bridge.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -8 lines 0 comments Download
M chrome/browser/android/ntp/popular_sites.h View 1 2 3 4 5 6 7 1 chunk +10 lines, -2 lines 0 comments Download
M chrome/browser/android/ntp/popular_sites.cc View 1 2 3 4 5 6 7 1 chunk +17 lines, -4 lines 0 comments Download
M chrome/browser/browser_resources.grd View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -3 lines 0 comments Download
D chrome/browser/resources/popular_sites_internals.css View 1 chunk +0 lines, -48 lines 0 comments Download
D chrome/browser/resources/popular_sites_internals.html View 1 chunk +0 lines, -80 lines 0 comments Download
D chrome/browser/resources/popular_sites_internals.js View 1 chunk +0 lines, -62 lines 0 comments Download
M chrome/browser/ui/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/popular_sites_internals_message_handler.h View 1 2 3 4 5 6 1 chunk +0 lines, -52 lines 0 comments Download
M chrome/browser/ui/webui/popular_sites_internals_message_handler.cc View 1 2 3 4 5 6 1 chunk +0 lines, -179 lines 0 comments Download
M chrome/browser/ui/webui/popular_sites_internals_ui.cc View 1 2 3 4 5 6 7 8 2 chunks +72 lines, -7 lines 0 comments Download
M components/ntp_tiles/BUILD.gn View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M components/ntp_tiles/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
A components/ntp_tiles/webui/popular_sites_internals_message_handler.h View 1 2 3 4 5 6 7 8 1 chunk +64 lines, -0 lines 0 comments Download
A + components/ntp_tiles/webui/popular_sites_internals_message_handler.cc View 1 2 3 4 5 6 7 8 8 chunks +47 lines, -53 lines 0 comments Download
A components/ntp_tiles/webui/popular_sites_internals_message_handler_client.h View 1 2 3 4 5 6 7 8 1 chunk +65 lines, -0 lines 0 comments Download
A + components/ntp_tiles/webui/resources/popular_sites_internals.css View 0 chunks +-1 lines, --1 lines 0 comments Download
A + components/ntp_tiles/webui/resources/popular_sites_internals.html View 1 chunk +4 lines, -0 lines 0 comments Download
A + components/ntp_tiles/webui/resources/popular_sites_internals.js View 0 chunks +-1 lines, --1 lines 0 comments Download
M components/resources/OWNERS View 1 1 chunk +1 line, -0 lines 0 comments Download
M components/resources/components_resources.grd View 1 chunk +1 line, -0 lines 0 comments Download
A components/resources/ntp_tiles_resources.grdp View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M ios/chrome/browser/chrome_url_constants.h View 2 chunks +2 lines, -0 lines 0 comments Download
M ios/chrome/browser/chrome_url_constants.cc View 3 chunks +5 lines, -2 lines 0 comments Download
M ios/chrome/browser/ui/webui/BUILD.gn View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -0 lines 0 comments Download
A ios/chrome/browser/ui/webui/popular_sites_internals_ui.h View 1 chunk +23 lines, -0 lines 0 comments Download
A ios/chrome/browser/ui/webui/popular_sites_internals_ui.cc View 1 2 3 4 5 6 7 8 1 chunk +100 lines, -0 lines 0 comments Download

Messages

Total messages: 50 (32 generated)
sfiera
bauerb: you're up for //chrome/browser/… and //components/ntp_tiles/…. I expect you can't realistically review this before ...
4 years, 1 month ago (2016-10-28 13:00:43 UTC) #10
Bernhard Bauer
https://codereview.chromium.org/2457033003/diff/40001/chrome/browser/ui/webui/popular_sites_internals_message_handler.cc File chrome/browser/ui/webui/popular_sites_internals_message_handler.cc (right): https://codereview.chromium.org/2457033003/diff/40001/chrome/browser/ui/webui/popular_sites_internals_message_handler.cc#newcode18 chrome/browser/ui/webui/popular_sites_internals_message_handler.cc:18: using ntp_tiles::PopularSitesInternalsMessageHandlerImpl; Do you need this? https://codereview.chromium.org/2457033003/diff/40001/components/ntp_tiles/webui/popular_sites_handler.cc File components/ntp_tiles/webui/popular_sites_handler.cc ...
4 years, 1 month ago (2016-10-28 13:23:07 UTC) #13
sdefresne
https://codereview.chromium.org/2457033003/diff/40001/components/ntp_tiles/webui/popular_sites_handler.cc File components/ntp_tiles/webui/popular_sites_handler.cc (right): https://codereview.chromium.org/2457033003/diff/40001/components/ntp_tiles/webui/popular_sites_handler.cc#newcode142 components/ntp_tiles/webui/popular_sites_handler.cc:142: std::unique_ptr<base::ListValue> sites_list(new base::ListValue); Use base::MakeUnique<> https://codereview.chromium.org/2457033003/diff/40001/components/ntp_tiles/webui/popular_sites_handler.h File components/ntp_tiles/webui/popular_sites_handler.h (right): ...
4 years, 1 month ago (2016-10-28 13:34:03 UTC) #14
sfiera
https://codereview.chromium.org/2457033003/diff/40001/components/ntp_tiles/webui/popular_sites_handler.h File components/ntp_tiles/webui/popular_sites_handler.h (right): https://codereview.chromium.org/2457033003/diff/40001/components/ntp_tiles/webui/popular_sites_handler.h#newcode28 components/ntp_tiles/webui/popular_sites_handler.h:28: class PopularSitesInternalsMessageHandlerInterface { On 2016/10/28 13:23:07, Bernhard Bauer wrote: ...
4 years, 1 month ago (2016-10-28 13:38:14 UTC) #15
sfiera
https://codereview.chromium.org/2457033003/diff/40001/chrome/browser/ui/webui/popular_sites_internals_message_handler.cc File chrome/browser/ui/webui/popular_sites_internals_message_handler.cc (right): https://codereview.chromium.org/2457033003/diff/40001/chrome/browser/ui/webui/popular_sites_internals_message_handler.cc#newcode18 chrome/browser/ui/webui/popular_sites_internals_message_handler.cc:18: using ntp_tiles::PopularSitesInternalsMessageHandlerImpl; On 2016/10/28 13:23:07, Bernhard Bauer wrote: > ...
4 years, 1 month ago (2016-10-28 14:12:43 UTC) #16
sfiera
Oh, and also, thanks for the quick response late on a Friday!
4 years, 1 month ago (2016-10-28 14:16:32 UTC) #17
Bernhard Bauer
Thanks! Yes, ...Client makes the pattern much clearer. https://codereview.chromium.org/2457033003/diff/40001/components/ntp_tiles/webui/popular_sites_handler.h File components/ntp_tiles/webui/popular_sites_handler.h (right): https://codereview.chromium.org/2457033003/diff/40001/components/ntp_tiles/webui/popular_sites_handler.h#newcode43 components/ntp_tiles/webui/popular_sites_handler.h:43: } ...
4 years, 1 month ago (2016-10-28 16:56:38 UTC) #23
sfiera
Reviewer changes +jochen to replace bauerb@. Jochen, I see you're OOO until Wednesday, which is ...
4 years, 1 month ago (2016-10-31 15:15:51 UTC) #29
jochen (gone - plz use gerrit)
lgtm with nits https://codereview.chromium.org/2457033003/diff/140001/components/ntp_tiles/webui/popular_sites_internals_message_handler.h File components/ntp_tiles/webui/popular_sites_internals_message_handler.h (right): https://codereview.chromium.org/2457033003/diff/140001/components/ntp_tiles/webui/popular_sites_internals_message_handler.h#newcode36 components/ntp_tiles/webui/popular_sites_internals_message_handler.h:36: PopularSitesInternalsMessageHandler( explicit https://codereview.chromium.org/2457033003/diff/140001/components/ntp_tiles/webui/popular_sites_internals_message_handler.h#newcode69 components/ntp_tiles/webui/popular_sites_internals_message_handler.h:69: class PopularSitesInternalsMessageHandlerClient ...
4 years, 1 month ago (2016-11-02 10:53:34 UTC) #32
sdefresne
lgtm I would also second jochen comment about moving PopularSitesInternalsMessageHandlerClient to a separate file.
4 years, 1 month ago (2016-11-02 12:58:23 UTC) #33
sfiera
https://codereview.chromium.org/2457033003/diff/140001/components/ntp_tiles/webui/popular_sites_internals_message_handler.h File components/ntp_tiles/webui/popular_sites_internals_message_handler.h (right): https://codereview.chromium.org/2457033003/diff/140001/components/ntp_tiles/webui/popular_sites_internals_message_handler.h#newcode36 components/ntp_tiles/webui/popular_sites_internals_message_handler.h:36: PopularSitesInternalsMessageHandler( On 2016/11/02 10:53:34, jochen (ooo Nov 1) wrote: ...
4 years, 1 month ago (2016-11-02 13:30:19 UTC) #35
sfiera
+pkasting, your approval is needed as an owner of //components/url_formatter. The code that depends on ...
4 years, 1 month ago (2016-11-02 13:32:02 UTC) #38
sfiera
On 2016/11/02 13:32:02, sfiera wrote: > +pkasting, your approval is needed as an owner of ...
4 years, 1 month ago (2016-11-02 13:33:28 UTC) #39
Peter Kasting
LGTM
4 years, 1 month ago (2016-11-02 17:02:23 UTC) #42
sfiera
Thanks all! Submitting now.
4 years, 1 month ago (2016-11-02 17:03:55 UTC) #43
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/2457033003/160001
4 years, 1 month ago (2016-11-02 17:04:48 UTC) #46
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 1 month ago (2016-11-02 17:10:09 UTC) #48
commit-bot: I haz the power
4 years, 1 month ago (2016-11-02 17:21:36 UTC) #50
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/7713f244a63217c94cef663b5dbd153d00e7cdb6
Cr-Commit-Position: refs/heads/master@{#429310}

Powered by Google App Engine
This is Rietveld 408576698