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

Side by Side Diff: net/http/http_auth_gssapi_posix.cc

Issue 1172753003: Move LowerCaseEqualsASCII to base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util
Patch Set: Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « net/http/http_auth.cc ('k') | net/http/http_auth_handler_basic.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/http/http_auth_gssapi_posix.h" 5 #include "net/http/http_auth_gssapi_posix.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 return false; 681 return false;
682 } 682 }
683 683
684 void HttpAuthGSSAPI::Delegate() { 684 void HttpAuthGSSAPI::Delegate() {
685 can_delegate_ = true; 685 can_delegate_ = true;
686 } 686 }
687 687
688 HttpAuth::AuthorizationResult HttpAuthGSSAPI::ParseChallenge( 688 HttpAuth::AuthorizationResult HttpAuthGSSAPI::ParseChallenge(
689 HttpAuthChallengeTokenizer* tok) { 689 HttpAuthChallengeTokenizer* tok) {
690 // Verify the challenge's auth-scheme. 690 // Verify the challenge's auth-scheme.
691 if (!LowerCaseEqualsASCII(tok->scheme(), 691 if (!base::LowerCaseEqualsASCII(tok->scheme(),
692 base::StringToLowerASCII(scheme_).c_str())) 692 base::StringToLowerASCII(scheme_).c_str()))
693 return HttpAuth::AUTHORIZATION_RESULT_INVALID; 693 return HttpAuth::AUTHORIZATION_RESULT_INVALID;
694 694
695 std::string encoded_auth_token = tok->base64_param(); 695 std::string encoded_auth_token = tok->base64_param();
696 696
697 if (encoded_auth_token.empty()) { 697 if (encoded_auth_token.empty()) {
698 // If a context has already been established, an empty Negotiate challenge 698 // If a context has already been established, an empty Negotiate challenge
699 // should be treated as a rejection of the current attempt. 699 // should be treated as a rejection of the current attempt.
700 if (scoped_sec_context_.get() != GSS_C_NO_CONTEXT) 700 if (scoped_sec_context_.get() != GSS_C_NO_CONTEXT)
701 return HttpAuth::AUTHORIZATION_RESULT_REJECT; 701 return HttpAuth::AUTHORIZATION_RESULT_REJECT;
702 DCHECK(decoded_server_auth_token_.empty()); 702 DCHECK(decoded_server_auth_token_.empty());
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 if (rv != OK) { 883 if (rv != OK) {
884 LOG(ERROR) << "Problem initializing context. \n" 884 LOG(ERROR) << "Problem initializing context. \n"
885 << DisplayExtendedStatus(library_, major_status, minor_status) 885 << DisplayExtendedStatus(library_, major_status, minor_status)
886 << '\n' 886 << '\n'
887 << DescribeContext(library_, scoped_sec_context_.get()); 887 << DescribeContext(library_, scoped_sec_context_.get());
888 } 888 }
889 return rv; 889 return rv;
890 } 890 }
891 891
892 } // namespace net 892 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_auth.cc ('k') | net/http/http_auth_handler_basic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698