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

Issue 2790463003: ntp_tiles: Cleanup enum names (Closed)

Created:
3 years, 8 months ago by Marc Treib
Modified:
3 years, 8 months ago
CC:
chromium-reviews, ios-reviews+chrome_chromium.org, ios-reviews_chromium.org, ntp-dev+reviews_chromium.org, pkl (ping after 24h if needed), noyau+watch_chromium.org, asvitkine+watch_chromium.org, agrieve+watch_chromium.org, marq+watch_chromium.org, sdefresne+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

ntp_tiles: Cleanup enum names - Rename "NTPTileSource" to "TileSource". ("NTP" is already in the folder/namespace, and is also not really accurate anyway.) - Rename "MostVisitedTileType" to "TileVisualType", and move it out of metrics.h and into its own file. This makes it more accurate, and more consistent with TileSource. - Update the Java packages for these from "org.chromium.chrome.browser.ntp" to "org.chromium.chrome.browser.suggestions". BUG=703165 Review-Url: https://codereview.chromium.org/2790463003 Cr-Commit-Position: refs/heads/master@{#461756} Committed: https://chromium.googlesource.com/chromium/src/+/231212e9d80a4868f0f1192c75e7203dbabb07f6

Patch Set 1 #

Total comments: 8

Patch Set 2 : rename ALL the things! #

Patch Set 3 : rebase #

Patch Set 4 : android #

Total comments: 7

Patch Set 5 : android2 #

Total comments: 3

Patch Set 6 : add back histogram enums #

Unified diffs Side-by-side diffs Delta from patch set Stats (+424 lines, -459 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSites.java View 1 4 chunks +7 lines, -10 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSitesBridge.java View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/suggestions/Tile.java View 1 2 3 4 chunks +13 lines, -15 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/suggestions/TileGroup.java View 1 2 3 3 chunks +3 lines, -4 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/ntp/NewTabPageTest.java View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerViewTest.java View 1 2 3 4 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/suggestions/FakeMostVisitedSites.java View 1 2 3 4 2 chunks +1 line, -2 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/suggestions/TileGroupTest.java View 1 2 chunks +1 line, -2 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/suggestions/TileTest.java View 1 7 chunks +17 lines, -19 lines 0 comments Download
M chrome/browser/android/ntp/most_visited_sites_bridge.cc View 1 3 chunks +6 lines, -8 lines 0 comments Download
M chrome/browser/search/instant_service.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/search/instant_service_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/search/search_ipc_router.h View 1 3 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/ui/search/search_ipc_router.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/search/search_ipc_router_unittest.cc View 1 2 chunks +10 lines, -12 lines 0 comments Download
M chrome/browser/ui/search/search_tab_helper.h View 1 2 chunks +5 lines, -7 lines 0 comments Download
M chrome/browser/ui/search/search_tab_helper.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/search/search_tab_helper_unittest.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/ntp/ntp_user_data_logger.h View 1 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/ntp/ntp_user_data_logger.cc View 1 3 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/ui/webui/ntp/ntp_user_data_logger_unittest.cc View 1 11 chunks +30 lines, -30 lines 0 comments Download
M chrome/browser/ui/webui/ntp_tiles_internals_ui.cc View 1 2 chunks +6 lines, -6 lines 0 comments Download
M chrome/common/instant.mojom View 1 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/common/instant.typemap View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/common/instant_struct_traits.h View 1 1 chunk +1 line, -2 lines 0 comments Download
M chrome/common/render_messages.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M chrome/common/search/instant_types.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/common/search/instant_types.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/searchbox/searchbox.h View 1 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/renderer/searchbox/searchbox.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/renderer/searchbox/searchbox_extension.cc View 1 2 3 chunks +7 lines, -9 lines 0 comments Download
M components/ntp_tiles/BUILD.gn View 1 2 3 3 chunks +4 lines, -3 lines 0 comments Download
M components/ntp_tiles/metrics.h View 1 3 chunks +5 lines, -34 lines 0 comments Download
M components/ntp_tiles/metrics.cc View 1 3 chunks +16 lines, -18 lines 0 comments Download
M components/ntp_tiles/metrics_unittest.cc View 1 6 chunks +20 lines, -20 lines 0 comments Download
M components/ntp_tiles/most_visited_sites.h View 1 3 chunks +3 lines, -2 lines 0 comments Download
M components/ntp_tiles/most_visited_sites.cc View 1 13 chunks +19 lines, -19 lines 0 comments Download
M components/ntp_tiles/most_visited_sites_unittest.cc View 1 20 chunks +104 lines, -106 lines 0 comments Download
M components/ntp_tiles/ntp_tile.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M components/ntp_tiles/ntp_tile.cc View 1 1 chunk +1 line, -1 line 0 comments Download
D components/ntp_tiles/ntp_tile_source.h View 1 1 chunk +0 lines, -28 lines 0 comments Download
A + components/ntp_tiles/tile_source.h View 1 2 chunks +5 lines, -5 lines 0 comments Download
A components/ntp_tiles/tile_visual_type.h View 1 2 3 4 5 1 chunk +43 lines, -0 lines 0 comments Download
M components/ntp_tiles/webui/ntp_tiles_internals_message_handler.cc View 1 4 chunks +9 lines, -11 lines 0 comments Download
M components/ntp_tiles/webui/ntp_tiles_internals_message_handler_client.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M ios/chrome/browser/ui/ntp/google_landing_controller.mm View 1 2 3 4 5 3 chunks +3 lines, -3 lines 0 comments Download
M ios/chrome/browser/ui/ntp/most_visited_cell.h View 1 1 chunk +1 line, -1 line 0 comments Download
M ios/chrome/browser/ui/ntp/most_visited_cell.mm View 1 3 chunks +5 lines, -5 lines 0 comments Download
M ios/chrome/browser/ui/webui/ntp_tiles_internals_ui.cc View 1 2 chunks +6 lines, -6 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 4 chunks +27 lines, -25 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 58 (29 generated)
Marc Treib
For crbug.com/703165, I'll have to pass this enum through IPC. Would be nice to fix ...
3 years, 8 months ago (2017-03-30 16:33:32 UTC) #4
Michael van Ouwerkerk
On 2017/03/30 16:33:32, Marc Treib wrote: > For crbug.com/703165, I'll have to pass this enum ...
3 years, 8 months ago (2017-03-30 16:42:19 UTC) #5
sfiera
LGTM On 2017/03/30 16:42:19, Michael van Ouwerkerk wrote: > On 2017/03/30 16:33:32, Marc Treib wrote: ...
3 years, 8 months ago (2017-03-30 16:52:00 UTC) #6
dgn
I guess the backend does not care much about how things are displayed, so I ...
3 years, 8 months ago (2017-03-30 19:37:38 UTC) #9
Marc Treib
On 2017/03/30 19:37:38, dgn wrote: > I guess the backend does not care much about ...
3 years, 8 months ago (2017-03-31 05:58:22 UTC) #10
sfiera
This CL is already an improvement, and changing it isn't any less work than writing ...
3 years, 8 months ago (2017-03-31 08:21:50 UTC) #11
Marc Treib
Agreed - I think this is a good state for now. +dgn,mvanouwerkerk, since you're already ...
3 years, 8 months ago (2017-03-31 08:28:43 UTC) #13
Michael van Ouwerkerk
https://codereview.chromium.org/2790463003/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/2790463003/diff/1/chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSites.java#newcode71 chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSites.java:71: * @param tileTypes An array of values from NTPTileType ...
3 years, 8 months ago (2017-03-31 09:01:15 UTC) #14
Michael van Ouwerkerk
On 2017/03/31 08:28:43, Marc Treib wrote: > Agreed - I think this is a good ...
3 years, 8 months ago (2017-03-31 09:02:08 UTC) #15
dgn
Didn't mean to rename everything, just the Java side. We have modifiers for that, the ...
3 years, 8 months ago (2017-03-31 09:41:51 UTC) #16
dgn
On 2017/03/31 09:41:51, dgn wrote: > Didn't mean to rename everything, just the Java side. ...
3 years, 8 months ago (2017-03-31 09:51:56 UTC) #17
Marc Treib
On 2017/03/31 09:51:56, dgn wrote: > On 2017/03/31 09:41:51, dgn wrote: > > Didn't mean ...
3 years, 8 months ago (2017-04-03 09:31:03 UTC) #18
sfiera
On 2017/04/03 09:31:03, Marc Treib wrote: > On 2017/03/31 09:51:56, dgn wrote: > > On ...
3 years, 8 months ago (2017-04-03 09:47:17 UTC) #19
Marc Treib
Alright, all done (assuming the bots are happy). This got rather larger than expected... PTAL ...
3 years, 8 months ago (2017-04-03 13:23:09 UTC) #22
Michael van Ouwerkerk
I'll take a look. Please update the CL description :-)
3 years, 8 months ago (2017-04-03 13:24:53 UTC) #23
Michael van Ouwerkerk
lgtm https://codereview.chromium.org/2790463003/diff/60001/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/2790463003/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSites.java#newcode83 chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSites.java:83: void recordOpenedMostVisitedItem(int index, @TileVisualType.TileVisualTypeEnum int type, Cool, and ...
3 years, 8 months ago (2017-04-03 13:36:00 UTC) #24
Michael van Ouwerkerk
And thanks!
3 years, 8 months ago (2017-04-03 13:36:13 UTC) #25
sfiera
LGTM with some very optional suggestions https://codereview.chromium.org/2790463003/diff/60001/components/ntp_tiles/tile_source.h File components/ntp_tiles/tile_source.h (right): https://codereview.chromium.org/2790463003/diff/60001/components/ntp_tiles/tile_source.h#newcode15 components/ntp_tiles/tile_source.h:15: TOP_SITES, You know, ...
3 years, 8 months ago (2017-04-03 13:38:10 UTC) #26
Marc Treib
Thanks! Since this CL is already way too large (and I've spent too much time ...
3 years, 8 months ago (2017-04-03 13:52:01 UTC) #28
sfiera
On 2017/04/03 13:52:01, Marc Treib wrote: > Thanks! > Since this CL is already way ...
3 years, 8 months ago (2017-04-03 13:59:31 UTC) #31
Marc Treib
+isherman for histograms.xml. PTAL! https://codereview.chromium.org/2790463003/diff/80001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (left): https://codereview.chromium.org/2790463003/diff/80001/tools/metrics/histograms/histograms.xml#oldcode102899 tools/metrics/histograms/histograms.xml:102899: - <int value="4" label="ThumbnailLocal"> I ...
3 years, 8 months ago (2017-04-03 14:03:25 UTC) #35
Marc Treib
+justincohen for ios/ +rsesek for IPC, more specifically: instant.mojom, instant.typemap, instant_struct_traits.h, and render_messages.h PTAL! It's ...
3 years, 8 months ago (2017-04-03 14:10:01 UTC) #37
justincohen
ios lgtm
3 years, 8 months ago (2017-04-03 14:55:55 UTC) #38
Robert Sesek
mojom LGTM
3 years, 8 months ago (2017-04-03 17:47:15 UTC) #41
Ilya Sherman
https://codereview.chromium.org/2790463003/diff/80001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (left): https://codereview.chromium.org/2790463003/diff/80001/tools/metrics/histograms/histograms.xml#oldcode102899 tools/metrics/histograms/histograms.xml:102899: - <int value="4" label="ThumbnailLocal"> On 2017/04/03 14:03:25, Marc Treib ...
3 years, 8 months ago (2017-04-03 21:34:55 UTC) #42
Marc Treib
isherman, please take a look again! https://codereview.chromium.org/2790463003/diff/80001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (left): https://codereview.chromium.org/2790463003/diff/80001/tools/metrics/histograms/histograms.xml#oldcode102899 tools/metrics/histograms/histograms.xml:102899: - <int value="4" ...
3 years, 8 months ago (2017-04-04 08:09:21 UTC) #43
Ilya Sherman
histograms.xml lgtm, thanks.
3 years, 8 months ago (2017-04-04 16:31:38 UTC) #52
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/2790463003/100001
3 years, 8 months ago (2017-04-04 16:56:16 UTC) #55
commit-bot: I haz the power
3 years, 8 months ago (2017-04-04 17:10:22 UTC) #58
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/231212e9d80a4868f0f1192c75e7...

Powered by Google App Engine
This is Rietveld 408576698