|
|
Created:
6 years, 4 months ago by wtc Modified:
6 years, 4 months ago Reviewers:
Ryan Hamilton CC:
chromium-reviews, cbentzel+watch_chromium.org Base URL:
svn://svn.chromium.org/chrome/trunk/src Project:
chromium Visibility:
Public. |
DescriptionAlso declare the transport_security_state_ member as const.
R=rch@chromium.org
BUG=399457
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=290969
Patch Set 1 #
Total comments: 3
Messages
Total messages: 13 (0 generated)
https://codereview.chromium.org/456953002/diff/1/net/quic/crypto/proof_verifi... File net/quic/crypto/proof_verifier_chromium.h (right): https://codereview.chromium.org/456953002/diff/1/net/quic/crypto/proof_verifi... net/quic/crypto/proof_verifier_chromium.h:82: CertVerifier* const cert_verifier_; I noticed that the cert_verifier_ member is const, so I think the related transport_security_state_ member should also be const.
lgtm https://codereview.chromium.org/456953002/diff/1/net/quic/crypto/proof_verifi... File net/quic/crypto/proof_verifier_chromium.h (right): https://codereview.chromium.org/456953002/diff/1/net/quic/crypto/proof_verifi... net/quic/crypto/proof_verifier_chromium.h:82: CertVerifier* const cert_verifier_; On 2014/08/08 21:59:17, wtc wrote: > > I noticed that the cert_verifier_ member is const, so I think the related > transport_security_state_ member should also be const. This means that the pointer never changes, but the object pointed to can change, right? Personally, I think I'd end up confused by the meaning of const here, but since we did this for the cert_verifier_ we might as well be consistent.
https://codereview.chromium.org/456953002/diff/1/net/quic/crypto/proof_verifi... File net/quic/crypto/proof_verifier_chromium.h (right): https://codereview.chromium.org/456953002/diff/1/net/quic/crypto/proof_verifi... net/quic/crypto/proof_verifier_chromium.h:82: CertVerifier* const cert_verifier_; On 2014/08/08 22:08:22, Ryan Hamilton wrote: > > This means that the pointer never changes, but the object pointed to can change, > right? That's correct. > Personally, I think I'd end up confused by the meaning of const here, but > since we did this for the cert_verifier_ we might as well be consistent. This use of 'const' tells a code reviewer that these members won't change once initialized. I didn't use 'const' this way before but gradually started to like it. I did notice that even the people who like to use 'const' this way often neglect to add 'const' to pointer members. Would you like me to remove 'const' from both of these members?
On 2014/08/13 18:37:35, wtc wrote: > https://codereview.chromium.org/456953002/diff/1/net/quic/crypto/proof_verifi... > File net/quic/crypto/proof_verifier_chromium.h (right): > > https://codereview.chromium.org/456953002/diff/1/net/quic/crypto/proof_verifi... > net/quic/crypto/proof_verifier_chromium.h:82: CertVerifier* const > cert_verifier_; > > On 2014/08/08 22:08:22, Ryan Hamilton wrote: > > > > This means that the pointer never changes, but the object pointed to can > change, > > right? > > That's correct. > > > Personally, I think I'd end up confused by the meaning of const here, but > > since we did this for the cert_verifier_ we might as well be consistent. > > This use of 'const' tells a code reviewer that these members won't change once > initialized. I didn't use 'const' this way before but gradually started to like > it. I did notice that even the people who like to use 'const' this way often > neglect to add 'const' to pointer members. > > Would you like me to remove 'const' from both of these members? *shrug* either way is fine with me, so long as we're consistent. Since this is helpful to you, I'm happy to land as is. Let's do that.
The CQ bit was checked by wtc@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wtc@chromium.org/456953002/1
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_aosp/bu...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_aosp on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_aosp/bu...)
The CQ bit was checked by wtc@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wtc@chromium.org/456953002/1
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_tests_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg_tes...) win_chromium_x64_rel_swarming on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
Message was sent while issue was closed.
Committed patchset #1 (1) as 290969 |