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

Issue 7605019: Reduce number of unnamed-type-template-args violations. (Closed)

Created:
9 years, 4 months ago by Peter Kasting
Modified:
9 years, 3 months ago
Reviewers:
Nico, wtc, brettw
CC:
chromium-reviews, brettw-cc_chromium.org
Visibility:
Public.

Description

Reduce number of unnamed-type-template-args violations (mostly when passing values to DCHECK(), ASSERT_EQ(), etc.), generally by naming previously-anonymous enums. We've decided not to eliminate the warning entirely because doing so is only possible with tons of ugly static_cast<>()s in Mac code. BUG=92247 TEST=Compiles Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=99086

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Patch Set 13 : '' #

Total comments: 13

Patch Set 14 : '' #

Total comments: 15

Patch Set 15 : '' #

Patch Set 16 : '' #

Patch Set 17 : '' #

Patch Set 18 : '' #

Patch Set 19 : '' #

Patch Set 20 : '' #

Patch Set 21 : '' #

Patch Set 22 : '' #

Patch Set 23 : '' #

Patch Set 24 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -55 lines) Patch
M base/base_paths.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M build/common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/status/clock_menu_button.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/net/predictor.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/net/predictor.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +3 lines, -8 lines 0 comments Download
M chrome/browser/net/predictor_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/password_manager/native_backend_gnome_x_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/chrome_notification_types.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M content/browser/geolocation/mock_location_provider.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M content/common/content_notification_types.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M content/common/media/media_stream_options.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -2 lines 0 comments Download
M content/common/media/media_stream_options.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -0 lines 0 comments Download
M content/common/page_transition_types.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M ipc/ipc_channel_posix_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 chunks +10 lines, -12 lines 0 comments Download
M net/base/x509_cert_types_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +5 lines, -5 lines 0 comments Download
M net/http/http_stream_parser.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -3 lines 0 comments Download
M net/proxy/proxy_config.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +2 lines, -2 lines 0 comments Download
M net/proxy/proxy_config.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M net/proxy/proxy_info.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M net/proxy/proxy_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
Peter Kasting
I converted "enum { CONST = val; }" to using "static const" where possible. For ...
9 years, 4 months ago (2011-08-15 17:57:36 UTC) #1
Nico
It looks like this patch does 3 things: 1.) Name enums (the change in base) ...
9 years, 4 months ago (2011-08-19 17:23:57 UTC) #2
Peter Kasting
I trimmed this patch down to basically be things (1) and (2). A few instances ...
9 years, 4 months ago (2011-08-19 18:51:13 UTC) #3
Nico
lgtm http://codereview.chromium.org/7605019/diff/29035/chrome/browser/net/predictor_unittest.cc File chrome/browser/net/predictor_unittest.cc (right): http://codereview.chromium.org/7605019/diff/29035/chrome/browser/net/predictor_unittest.cc#newcode267 chrome/browser/net/predictor_unittest.cc:267: const ListValue& referral_list) { This indentation style is ...
9 years, 4 months ago (2011-08-19 20:34:23 UTC) #4
Peter Kasting
http://codereview.chromium.org/7605019/diff/29035/net/base/x509_cert_types_mac.cc File net/base/x509_cert_types_mac.cc (right): http://codereview.chromium.org/7605019/diff/29035/net/base/x509_cert_types_mac.cc#newcode50 net/base/x509_cert_types_mac.cc:50: ValueTypes value_type; On 2011/08/19 20:34:23, Nico wrote: > Is ...
9 years, 4 months ago (2011-08-19 20:52:21 UTC) #5
Peter Kasting
Added OWNERS: brettw: base, content, ppapi wtc: chrome, crypto, net
9 years, 4 months ago (2011-08-19 23:09:01 UTC) #6
brettw
I'f remove pp_errors.h from this CL. If it's important that we change it, we should ...
9 years, 4 months ago (2011-08-21 05:37:03 UTC) #7
Peter Kasting
I'll take pp_errors.h out of this patch because the goal here is not to make ...
9 years, 4 months ago (2011-08-22 03:56:41 UTC) #8
brettw
http://codereview.chromium.org/7605019/diff/29035/ppapi/c/pp_errors.h File ppapi/c/pp_errors.h (right): http://codereview.chromium.org/7605019/diff/29035/ppapi/c/pp_errors.h#newcode27 ppapi/c/pp_errors.h:27: enum ErrorCodes { On 2011/08/22 03:56:41, Peter Kasting wrote: ...
9 years, 4 months ago (2011-08-22 04:11:08 UTC) #9
wtc
pkasting: thanks for the patch. In the CL's commit message, please mention that ASSERT_EQ, DCHECK_EQ, ...
9 years, 4 months ago (2011-08-24 01:18:53 UTC) #10
Peter Kasting
http://codereview.chromium.org/7605019/diff/29035/net/proxy/proxy_config.h File net/proxy/proxy_config.h (right): http://codereview.chromium.org/7605019/diff/29035/net/proxy/proxy_config.h#newcode113 net/proxy/proxy_config.h:113: static const ID kInvalidConfigID; On 2011/08/24 01:18:53, wtc wrote: ...
9 years, 4 months ago (2011-08-24 01:29:22 UTC) #11
brettw
LGTM
9 years, 4 months ago (2011-08-24 20:55:55 UTC) #12
Peter Kasting
New snap up. Removed pp_errors.h. Added to change description. Changed plural enum names to singular ...
9 years, 4 months ago (2011-08-26 20:43:08 UTC) #13
wtc
LGTM on Patch Set 14. I only reviewed the files under src/crypto and src/net. Could ...
9 years, 4 months ago (2011-08-26 21:20:53 UTC) #14
Peter Kasting
http://codereview.chromium.org/7605019/diff/38001/crypto/sha2.h File crypto/sha2.h (right): http://codereview.chromium.org/7605019/diff/38001/crypto/sha2.h#newcode19 crypto/sha2.h:19: enum Constants { On 2011/08/26 21:20:53, wtc wrote: > ...
9 years, 4 months ago (2011-08-26 21:32:51 UTC) #15
wtc
http://codereview.chromium.org/7605019/diff/38001/crypto/sha2_unittest.cc File crypto/sha2_unittest.cc (right): http://codereview.chromium.org/7605019/diff/38001/crypto/sha2_unittest.cc#newcode48 crypto/sha2_unittest.cc:48: ASSERT_EQ(static_cast<size_t>(crypto::SHA256_LENGTH), output1.size()); On 2011/08/26 21:32:51, Peter Kasting wrote: > ...
9 years, 4 months ago (2011-08-26 22:30:50 UTC) #16
Peter Kasting
On 2011/08/26 22:30:50, wtc wrote: > If we are not re-enabling the warning, then we ...
9 years, 4 months ago (2011-08-26 23:00:55 UTC) #17
Peter Kasting
New snap initializes constants in the header instead of the .cc file for the cases ...
9 years, 3 months ago (2011-08-29 20:30:36 UTC) #18
wtc
http://codereview.chromium.org/7605019/diff/38001/crypto/sha2_unittest.cc File crypto/sha2_unittest.cc (right): http://codereview.chromium.org/7605019/diff/38001/crypto/sha2_unittest.cc#newcode48 crypto/sha2_unittest.cc:48: ASSERT_EQ(static_cast<size_t>(crypto::SHA256_LENGTH), output1.size()); On 2011/08/26 22:30:50, wtc wrote: > > ...
9 years, 3 months ago (2011-08-29 20:44:32 UTC) #19
Peter Kasting
New snap up. This eliminates "enum Constants { ... }" and replaces it with static ...
9 years, 3 months ago (2011-08-30 02:22:27 UTC) #20
Peter Kasting
There is one problem with the combination of using static consts and defining them at ...
9 years, 3 months ago (2011-08-30 03:25:01 UTC) #21
Peter Kasting
Nico suggested another workaround, which is to go ahead and define storage for the affected ...
9 years, 3 months ago (2011-08-30 19:04:19 UTC) #22
wtc
Peter: you are highly respected on the Chrome team. With all due respect, I have ...
9 years, 3 months ago (2011-08-31 19:47:27 UTC) #23
Peter Kasting
9 years, 3 months ago (2011-08-31 20:44:19 UTC) #24
I've split off everything that has changed since patch 14 except for a few cases
where I implemented fixes you asked for exactly as you'd specified.  I'll upload
those changes as individual issues to avoid creating another huge review.

I'll land what's left here once it passes the trybots as everything that remains
has already been reviewed.

Powered by Google App Engine
This is Rietveld 408576698