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

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

Issue 6191001: Cleanup: Use AUTH_SCHEME enum instead of a string. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Merge with trunk Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « net/http/http_auth_handler_mock.cc ('k') | net/http/http_auth_handler_ntlm.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_handler_negotiate.h" 5 #include "net/http/http_auth_handler_negotiate.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } 86 }
87 // GSSAPI does not provide a way to enter username/password to 87 // GSSAPI does not provide a way to enter username/password to
88 // obtain a TGT. If the default credentials are not allowed for 88 // obtain a TGT. If the default credentials are not allowed for
89 // a particular site (based on whitelist), fall back to a 89 // a particular site (based on whitelist), fall back to a
90 // different scheme. 90 // different scheme.
91 if (!AllowsDefaultCredentials()) 91 if (!AllowsDefaultCredentials())
92 return false; 92 return false;
93 #endif 93 #endif
94 if (CanDelegate()) 94 if (CanDelegate())
95 auth_system_.Delegate(); 95 auth_system_.Delegate();
96 auth_scheme_ = AUTH_SCHEME_NEGOTIATE; 96 auth_scheme_ = HttpAuth::AUTH_SCHEME_NEGOTIATE;
97 scheme_ = "negotiate";
98 score_ = 4; 97 score_ = 4;
99 properties_ = ENCRYPTS_IDENTITY | IS_CONNECTION_BASED; 98 properties_ = ENCRYPTS_IDENTITY | IS_CONNECTION_BASED;
100 HttpAuth::AuthorizationResult auth_result = 99 HttpAuth::AuthorizationResult auth_result =
101 auth_system_.ParseChallenge(challenge); 100 auth_system_.ParseChallenge(challenge);
102 return (auth_result == HttpAuth::AUTHORIZATION_RESULT_ACCEPT); 101 return (auth_result == HttpAuth::AUTHORIZATION_RESULT_ACCEPT);
103 } 102 }
104 103
105 HttpAuth::AuthorizationResult HttpAuthHandlerNegotiate::HandleAnotherChallenge( 104 HttpAuth::AuthorizationResult HttpAuthHandlerNegotiate::HandleAnotherChallenge(
106 HttpAuth::ChallengeTokenizer* challenge) { 105 HttpAuth::ChallengeTokenizer* challenge) {
107 return auth_system_.ParseChallenge(challenge); 106 return auth_system_.ParseChallenge(challenge);
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 resolver_, disable_cname_lookup_, 323 resolver_, disable_cname_lookup_,
325 use_port_)); 324 use_port_));
326 if (!tmp_handler->InitFromChallenge(challenge, target, origin, net_log)) 325 if (!tmp_handler->InitFromChallenge(challenge, target, origin, net_log))
327 return ERR_INVALID_RESPONSE; 326 return ERR_INVALID_RESPONSE;
328 handler->swap(tmp_handler); 327 handler->swap(tmp_handler);
329 return OK; 328 return OK;
330 #endif 329 #endif
331 } 330 }
332 331
333 } // namespace net 332 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_auth_handler_mock.cc ('k') | net/http/http_auth_handler_ntlm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698