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

Side by Side Diff: net/http/http_auth_gssapi_posix.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 unified diff | Download patch
« no previous file with comments | « net/http/http_auth_gssapi_posix.h ('k') | net/http/http_auth_gssapi_posix_unittest.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 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 680
681 bool HttpAuthGSSAPI::AllowsExplicitCredentials() const { 681 bool HttpAuthGSSAPI::AllowsExplicitCredentials() const {
682 return false; 682 return false;
683 } 683 }
684 684
685 void HttpAuthGSSAPI::Delegate() { 685 void HttpAuthGSSAPI::Delegate() {
686 can_delegate_ = true; 686 can_delegate_ = true;
687 } 687 }
688 688
689 HttpAuth::AuthorizationResult HttpAuthGSSAPI::ParseChallenge( 689 HttpAuth::AuthorizationResult HttpAuthGSSAPI::ParseChallenge(
690 HttpAuthChallengeTokenizer* tok) { 690 const HttpAuthChallengeTokenizer& tok) {
691 if (scoped_sec_context_.get() == GSS_C_NO_CONTEXT) { 691 if (scoped_sec_context_.get() == GSS_C_NO_CONTEXT) {
692 return net::ParseFirstRoundChallenge(scheme_, tok); 692 return ParseFirstRoundChallenge(scheme_, tok);
693 } 693 }
694 std::string encoded_auth_token; 694 std::string encoded_auth_token;
695 return net::ParseLaterRoundChallenge(scheme_, tok, &encoded_auth_token, 695 return ParseLaterRoundChallenge(scheme_, tok, &encoded_auth_token,
696 &decoded_server_auth_token_); 696 &decoded_server_auth_token_);
697 } 697 }
698 698
699 int HttpAuthGSSAPI::GenerateAuthToken(const AuthCredentials* credentials, 699 int HttpAuthGSSAPI::GenerateAuthToken(const AuthCredentials* credentials,
700 const std::string& spn, 700 const std::string& spn,
701 std::string* auth_token, 701 std::string* auth_token,
702 const CompletionCallback& /*callback*/) { 702 const CompletionCallback& /*callback*/) {
703 DCHECK(auth_token); 703 DCHECK(auth_token);
704 704
705 gss_buffer_desc input_token = GSS_C_EMPTY_BUFFER; 705 gss_buffer_desc input_token = GSS_C_EMPTY_BUFFER;
706 input_token.length = decoded_server_auth_token_.length(); 706 input_token.length = decoded_server_auth_token_.length();
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 if (rv != OK) { 863 if (rv != OK) {
864 LOG(ERROR) << "Problem initializing context. \n" 864 LOG(ERROR) << "Problem initializing context. \n"
865 << DisplayExtendedStatus(library_, major_status, minor_status) 865 << DisplayExtendedStatus(library_, major_status, minor_status)
866 << '\n' 866 << '\n'
867 << DescribeContext(library_, scoped_sec_context_.get()); 867 << DescribeContext(library_, scoped_sec_context_.get());
868 } 868 }
869 return rv; 869 return rv;
870 } 870 }
871 871
872 } // namespace net 872 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_auth_gssapi_posix.h ('k') | net/http/http_auth_gssapi_posix_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698