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

Unified Diff: net/http/http_auth_multi_round_parse.cc

Issue 1383613002: [net/http auth] Cleanup. Method names, and constness. Base URL: https://chromium.googlesource.com/chromium/src.git@mock-auth-handler-generalization
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_auth_multi_round_parse.h ('k') | net/http/http_auth_multi_round_parse_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_multi_round_parse.cc
diff --git a/net/http/http_auth_multi_round_parse.cc b/net/http/http_auth_multi_round_parse.cc
index 5c767a1aef3e0a712c64d1eeab0afb75cfcf8b9b..c51176357c6a093313d6fb2ac45c5f71d323b997 100644
--- a/net/http/http_auth_multi_round_parse.cc
+++ b/net/http/http_auth_multi_round_parse.cc
@@ -11,12 +11,12 @@ namespace net {
HttpAuth::AuthorizationResult ParseFirstRoundChallenge(
const std::string& scheme,
- HttpAuthChallengeTokenizer* challenge) {
+ const HttpAuthChallengeTokenizer& challenge) {
// Verify the challenge's auth-scheme.
- if (!challenge->SchemeIs(scheme))
+ if (!challenge.SchemeIs(scheme))
return HttpAuth::AUTHORIZATION_RESULT_INVALID;
- std::string encoded_auth_token = challenge->base64_param();
+ std::string encoded_auth_token = challenge.base64_param();
if (!encoded_auth_token.empty()) {
return HttpAuth::AUTHORIZATION_RESULT_INVALID;
}
@@ -25,14 +25,14 @@ HttpAuth::AuthorizationResult ParseFirstRoundChallenge(
HttpAuth::AuthorizationResult ParseLaterRoundChallenge(
const std::string& scheme,
- HttpAuthChallengeTokenizer* challenge,
+ const HttpAuthChallengeTokenizer& challenge,
std::string* encoded_token,
std::string* decoded_token) {
// Verify the challenge's auth-scheme.
- if (!challenge->SchemeIs(scheme))
+ if (!challenge.SchemeIs(scheme))
return HttpAuth::AUTHORIZATION_RESULT_INVALID;
- *encoded_token = challenge->base64_param();
+ *encoded_token = challenge.base64_param();
if (encoded_token->empty())
return HttpAuth::AUTHORIZATION_RESULT_REJECT;
« no previous file with comments | « net/http/http_auth_multi_round_parse.h ('k') | net/http/http_auth_multi_round_parse_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698