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

Issue 5034001: Remove static "set_fixed_cnonce" in favor of NonceGenerator objects.... (Closed)

Created:
10 years, 1 month ago by cbentzel
Modified:
9 years, 7 months ago
Reviewers:
eroman, wtc
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Remove static "set_fixed_cnonce" in favor of NonceGenerator objects. Trying to simplify cleanup for more unit tests. BUG=None TEST=net_unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=66439

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 4

Patch Set 3 : Comment fixes #

Patch Set 4 : Merge with trunk #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -23 lines) Patch
M net/http/http_auth_handler_digest.h View 1 2 3 6 chunks +52 lines, -9 lines 3 comments Download
M net/http/http_auth_handler_digest.cc View 1 2 3 6 chunks +32 lines, -11 lines 0 comments Download
M net/http/http_auth_handler_digest_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_auth_handler_factory.h View 3 2 chunks +3 lines, -1 line 1 comment Download
M net/http/http_network_transaction_unittest.cc View 1 2 3 1 chunk +6 lines, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
cbentzel
I'm not sure if this is ready for final review. I am curious to know ...
10 years, 1 month ago (2010-11-15 19:49:56 UTC) #1
cbentzel
Added Eric to reviewer list for his opinion.
10 years, 1 month ago (2010-11-15 19:55:36 UTC) #2
eroman
http://codereview.chromium.org/5034001/diff/8001/net/http/http_auth_handler_digest.h File net/http/http_auth_handler_digest.h (right): http://codereview.chromium.org/5034001/diff/8001/net/http/http_auth_handler_digest.h#newcode41 net/http/http_auth_handler_digest.h:41: std::string nonce_; nit: const http://codereview.chromium.org/5034001/diff/8001/net/http/http_auth_handler_digest.h#newcode49 net/http/http_auth_handler_digest.h:49: virtual int CreateAuthHandler(HttpAuth::ChallengeTokenizer* ...
10 years, 1 month ago (2010-11-16 00:02:35 UTC) #3
wtc
cbentzel: I think the general idea is good. As for specific implementation, you can also ...
10 years, 1 month ago (2010-11-16 01:47:41 UTC) #4
cbentzel
Sorry Eric - this code wasn't ready for final review, but I was wondering if ...
10 years, 1 month ago (2010-11-16 02:03:43 UTC) #5
cbentzel
OK, this is ready for final review now. Thanks for comments so far. I decided ...
10 years, 1 month ago (2010-11-16 21:13:51 UTC) #6
eroman
lgtm http://codereview.chromium.org/5034001/diff/26001/net/http/http_auth_handler_factory.h File net/http/http_auth_handler_factory.h (right): http://codereview.chromium.org/5034001/diff/26001/net/http/http_auth_handler_factory.h#newcode27 net/http/http_auth_handler_factory.h:27: // The HttpAuthHandlerFactory object _must_ outlive any of ...
10 years, 1 month ago (2010-11-17 04:35:40 UTC) #7
wtc
I only reviewed the .h files. They look good to me except for an excessive ...
10 years, 1 month ago (2010-11-17 20:21:50 UTC) #8
cbentzel
10 years, 1 month ago (2010-11-18 12:06:37 UTC) #9
http://codereview.chromium.org/5034001/diff/26001/net/http/http_auth_handler_...
File net/http/http_auth_handler_digest.h (right):

http://codereview.chromium.org/5034001/diff/26001/net/http/http_auth_handler_...
net/http/http_auth_handler_digest.h:77: scoped_ptr<const NonceGenerator>
nonce_generator_;
On 2010/11/17 20:21:51, wtc wrote:
> I know the C++ language allows deleting a const pointer, but
> it is counter-intuitive to use a scoped_ptr<const Foo>.
> 
> I would change set_nonce_generator to take a non-const
> pointer and define nonce_generator_ as
>     scoped_ptr<NonceGenerator> nonce_generator_;

I tend to veer towards const-heaviness.

Flame war that justifies this case was here:
http://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thre...

Basically, concensus was that scoped_refptr<const T> was OK, since deletion was
not considered mutation.

I can easily shift back to non-const nonce if you think it makes the contract
clearer.

Powered by Google App Engine
This is Rietveld 408576698