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

Issue 6191001: Cleanup: Use AUTH_SCHEME enum instead of a string. (Closed)

Created:
9 years, 11 months ago by cbentzel
Modified:
9 years, 7 months ago
Reviewers:
eroman, asanka (google)
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Cleanup: Use AUTH_SCHEME enum instead of a string. BUG=None TEST=trybots Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=71318

Patch Set 1 #

Patch Set 2 : GetSchemeName is less draconian #

Patch Set 3 : Added AUTH_SCHEME_MOCK #

Total comments: 9

Patch Set 4 : Fixed Eric's nits #

Patch Set 5 : '' #

Patch Set 6 : Merge with trunk #

Unified diffs Side-by-side diffs Delta from patch set Stats (+232 lines, -165 lines) Patch
M net/http/http_auth.h View 1 2 3 4 5 4 chunks +14 lines, -2 lines 0 comments Download
M net/http/http_auth.cc View 1 2 3 4 5 5 chunks +34 lines, -8 lines 0 comments Download
M net/http/http_auth_cache.h View 1 2 3 4 5 8 chunks +14 lines, -12 lines 0 comments Download
M net/http/http_auth_cache.cc View 1 2 3 4 5 4 chunks +4 lines, -4 lines 0 comments Download
M net/http/http_auth_cache_unittest.cc View 1 2 3 4 5 14 chunks +88 lines, -58 lines 0 comments Download
M net/http/http_auth_controller.h View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M net/http/http_auth_controller.cc View 1 2 3 4 5 10 chunks +13 lines, -12 lines 0 comments Download
M net/http/http_auth_handler.h View 1 2 3 4 5 3 chunks +2 lines, -18 lines 0 comments Download
M net/http/http_auth_handler.cc View 1 2 3 4 5 2 chunks +2 lines, -3 lines 0 comments Download
M net/http/http_auth_handler_basic.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M net/http/http_auth_handler_digest.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M net/http/http_auth_handler_factory_unittest.cc View 1 2 3 4 5 4 chunks +4 lines, -4 lines 0 comments Download
M net/http/http_auth_handler_mock.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M net/http/http_auth_handler_negotiate.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M net/http/http_auth_handler_ntlm.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M net/http/http_auth_unittest.cc View 1 2 3 4 5 4 chunks +19 lines, -18 lines 0 comments Download
M net/http/http_proxy_client_socket_pool_unittest.cc View 1 2 3 4 5 1 chunk +7 lines, -2 lines 0 comments Download
M net/socket/ssl_client_socket_pool_unittest.cc View 1 2 3 4 5 1 chunk +7 lines, -2 lines 0 comments Download
M net/socket_stream/socket_stream.cc View 1 2 3 4 5 6 chunks +9 lines, -7 lines 0 comments Download
M net/spdy/spdy_proxy_client_socket_unittest.cc View 1 2 3 4 5 1 chunk +7 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
cbentzel
Asanka, for some reason codereview won't let me use your chromium.org account - probably needs ...
9 years, 11 months ago (2011-01-07 19:33:03 UTC) #1
cbentzel
I'm trying to figure out why the trybots are having problems building - the patch ...
9 years, 11 months ago (2011-01-07 20:00:15 UTC) #2
cbentzel
The newest patch set adds AUTH_SCHEME_MOCK for unit tests. I'm interested in your feedback about ...
9 years, 11 months ago (2011-01-10 14:44:05 UTC) #3
eroman
lgtm http://codereview.chromium.org/6191001/diff/39001/net/http/http_auth.cc File net/http/http_auth.cc (right): http://codereview.chromium.org/6191001/diff/39001/net/http/http_auth.cc#newcode179 net/http/http_auth.cc:179: return "invalid_scheme"; Can you add a NOTREACHED here? ...
9 years, 11 months ago (2011-01-10 19:32:39 UTC) #4
cbentzel
9 years, 11 months ago (2011-01-11 16:54:18 UTC) #5
Thanks for the review, Eric.

I'll land, pending trybot results.

http://codereview.chromium.org/6191001/diff/39001/net/http/http_auth.cc
File net/http/http_auth.cc (right):

http://codereview.chromium.org/6191001/diff/39001/net/http/http_auth.cc#newco...
net/http/http_auth.cc:179: return "invalid_scheme";
On 2011/01/10 19:32:39, eroman wrote:
> Can you add a NOTREACHED here?

Done.

http://codereview.chromium.org/6191001/diff/39001/net/http/http_auth.h
File net/http/http_auth.h (right):

http://codereview.chromium.org/6191001/diff/39001/net/http/http_auth.h#newcod...
net/http/http_auth.h:103: // TODO(cbentzel): Change these to return const char*
instead.
On 2011/01/10 19:32:39, eroman wrote:
> What function(s) is this comment referring to?

For the GetChallengeHaeaderName/GetAuthorizationHeaderName/GetAuthTargetString +
GetSchemeName.

I removed for now and made GetSchemeName return const char* [and renamed to
SchemeToString as you suggested].

http://codereview.chromium.org/6191001/diff/39001/net/http/http_auth.h#newcod...
net/http/http_auth.h:118: static std::string GetSchemeName(Scheme scheme);
On 2011/01/10 19:32:39, eroman wrote:
> nit: I suggest calling this:
>   const char* SchemeToString(Scheme scheme);
> 
> Which is consistent with some others like ErrorToString().

Done.

http://codereview.chromium.org/6191001/diff/39001/net/http/http_auth_cache.h
File net/http/http_auth_cache.h (right):

http://codereview.chromium.org/6191001/diff/39001/net/http/http_auth_cache.h#...
net/http/http_auth_cache.h:122: // The authentication scheme string of the
challenge
On 2011/01/10 19:32:39, eroman wrote:
> "string" -- no longer applicable.

Done.

Powered by Google App Engine
This is Rietveld 408576698