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

Issue 377423003: Lots of random cleanups, mostly for native_theme_win.cc: (Closed)

Created:
6 years, 5 months ago by Peter Kasting
Modified:
6 years, 5 months ago
Reviewers:
sky
CC:
chromium-reviews, tfarina
Visibility:
Public.

Description

Lots of random cleanups, mostly for native_theme_win.cc: * Rename "max state" value to "num states" so it sounds less like it's the largest valid state * Shorten/simplify code * Reduce indenting * No else after return * Use scoping objects where possible * Return directly out of switches where possible * Don't handle DCHECK failure * Omit NOTREACHED messages (not necessary in tracking down bugs) * "const" goes on same line as last function arg * Order "disabled/hovered/normal/pressed" cases the same way every time * Fix spelling errors * Eliminate unnecessary {}s BUG=none TEST=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=282533

Patch Set 1 #

Total comments: 1

Patch Set 2 : Attempt build fix #

Patch Set 3 : Build fix #2 #

Patch Set 4 : Build fix #2, for reals #

Total comments: 12

Patch Set 5 : Review comments #

Patch Set 6 : Tweak switches #

Unified diffs Side-by-side diffs Delta from patch set Stats (+537 lines, -601 lines) Patch
M chrome/browser/ui/libgtk2ui/gtk2_util.cc View 1 2 3 4 1 chunk +5 lines, -5 lines 0 comments Download
M ui/native_theme/native_theme.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/native_theme/native_theme_aura.h View 4 chunks +8 lines, -8 lines 0 comments Download
M ui/native_theme/native_theme_aura.cc View 5 chunks +14 lines, -15 lines 0 comments Download
M ui/native_theme/native_theme_win.cc View 1 2 3 4 5 53 chunks +504 lines, -567 lines 0 comments Download
M ui/views/controls/button/button.cc View 1 2 3 4 1 chunk +5 lines, -5 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Peter Kasting
https://codereview.chromium.org/377423003/diff/1/ui/native_theme/native_theme_win.cc File ui/native_theme/native_theme_win.cc (right): https://codereview.chromium.org/377423003/diff/1/ui/native_theme/native_theme_win.cc#newcode884 ui/native_theme/native_theme_win.cc:884: ((state == kDisabled) ? MC_CHECKMARKDISABLED : MC_CHECKMARKNORMAL); I usually ...
6 years, 5 months ago (2014-07-09 20:31:01 UTC) #1
sky
https://codereview.chromium.org/377423003/diff/50001/chrome/browser/ui/libgtk2ui/gtk2_util.cc File chrome/browser/ui/libgtk2ui/gtk2_util.cc (left): https://codereview.chromium.org/377423003/diff/50001/chrome/browser/ui/libgtk2ui/gtk2_util.cc#oldcode139 chrome/browser/ui/libgtk2ui/gtk2_util.cc:139: case ui::NativeTheme::kMaxState: NOTREACHED() << "Unknown state: " << state; ...
6 years, 5 months ago (2014-07-10 16:05:39 UTC) #2
Peter Kasting
Here are my counterarguments; see if you find them convincing or not :) https://codereview.chromium.org/377423003/diff/50001/chrome/browser/ui/libgtk2ui/gtk2_util.cc File ...
6 years, 5 months ago (2014-07-10 18:23:15 UTC) #3
sky
If you still disagree ask another owner for their opinion. I'll let them be the ...
6 years, 5 months ago (2014-07-10 19:33:10 UTC) #4
Peter Kasting
PTAL. Despite the comments below, I did my best to change all switch statements in ...
6 years, 5 months ago (2014-07-10 21:44:25 UTC) #5
sky
LGTM
6 years, 5 months ago (2014-07-10 22:58:12 UTC) #6
Peter Kasting
The CQ bit was checked by pkasting@chromium.org
6 years, 5 months ago (2014-07-10 23:05:05 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pkasting@chromium.org/377423003/90001
6 years, 5 months ago (2014-07-10 23:06:20 UTC) #8
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: mac_chromium_rel on tryserver.chromium ...
6 years, 5 months ago (2014-07-11 00:54:25 UTC) #9
commit-bot: I haz the power
6 years, 5 months ago (2014-07-11 03:55:07 UTC) #10
Message was sent while issue was closed.
Change committed as 282533

Powered by Google App Engine
This is Rietveld 408576698