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

Issue 2663013003: Rename various LayoutDelegate types/functions for brevity and consistency. (Closed)

Created:
3 years, 10 months ago by Peter Kasting
Modified:
3 years, 10 months ago
Reviewers:
Elly Fong-Jones
CC:
chromium-reviews, tfarina
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Rename various LayoutDelegate types/functions for brevity and consistency. * "Type" was removed from the enum class names; many of the enums in the codebase are types of things, but we don't normally append "type". Removing this left the code reading about as clearly as before to me, but was more consistent with elsewhere, and briefer. * LayoutDistance -> Metric. "Layout" is redundant with LayoutDelegate, which is used to qualify accesses to the enum anyway, and "distance" seems less clear to me than "metric" (plus is longer), especially if in the future we add values that are less obviously distances, e.g. font sizes or something. The primary goal of these changes was to reduce the verbosity at call sites. I hope to use these much more broadly across views, but the current syntax felt very long-winded. It seems like maybe more could be done, but this is a start. Of course, due to the vagaries of git cl format, this ended up being wrapped over more lines than before, but it's less verbose doing so. :P Also changed one const to constexpr. BUG=none TEST=none Review-Url: https://codereview.chromium.org/2663013003 Cr-Commit-Position: refs/heads/master@{#447429} Committed: https://chromium.googlesource.com/chromium/src/+/a023c75cbfdf289ca3104d272c16447dead2c1a5

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+136 lines, -126 lines) Patch
M chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc View 4 chunks +18 lines, -12 lines 2 comments Download
M chrome/browser/ui/views/collected_cookies_views.cc View 5 chunks +28 lines, -25 lines 0 comments Download
M chrome/browser/ui/views/content_setting_bubble_contents.cc View 4 chunks +12 lines, -16 lines 0 comments Download
M chrome/browser/ui/views/cookie_info_view.cc View 2 chunks +10 lines, -8 lines 0 comments Download
M chrome/browser/ui/views/harmony/harmony_layout_delegate.h View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/harmony/harmony_layout_delegate.cc View 2 chunks +15 lines, -15 lines 0 comments Download
M chrome/browser/ui/views/harmony/layout_delegate.h View 5 chunks +8 lines, -8 lines 0 comments Download
M chrome/browser/ui/views/harmony/layout_delegate.cc View 2 chunks +11 lines, -11 lines 0 comments Download
M chrome/browser/ui/views/layout_utils.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/login_view.cc View 2 chunks +20 lines, -15 lines 0 comments Download
M chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.cc View 3 chunks +9 lines, -9 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 14 (9 generated)
Peter Kasting
3 years, 10 months ago (2017-01-31 10:43:47 UTC) #5
Elly Fong-Jones
lgtm but I think this might need git cl format https://codereview.chromium.org/2663013003/diff/1/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc File chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc (right): https://codereview.chromium.org/2663013003/diff/1/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc#newcode355 ...
3 years, 10 months ago (2017-01-31 15:42:14 UTC) #8
Peter Kasting
https://codereview.chromium.org/2663013003/diff/1/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc File chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc (right): https://codereview.chromium.org/2663013003/diff/1/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc#newcode355 chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc:355: 0, On 2017/01/31 15:42:14, Elly Fong-Jones wrote: > is ...
3 years, 10 months ago (2017-01-31 21:41:55 UTC) #9
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/2663013003/1
3 years, 10 months ago (2017-02-01 02:42:45 UTC) #11
commit-bot: I haz the power
3 years, 10 months ago (2017-02-01 02:48:14 UTC) #14
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/a023c75cbfdf289ca3104d272c16...

Powered by Google App Engine
This is Rietveld 408576698