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

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

Issue 2351513002: net: rename BoundNetLog to NetLogWithSource (Closed)
Patch Set: one more fix, content bound_net_log_ Created 4 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // See "SSPI Sample Application" at 5 // See "SSPI Sample Application" at
6 // http://msdn.microsoft.com/en-us/library/aa918273.aspx 6 // http://msdn.microsoft.com/en-us/library/aa918273.aspx
7 // and "NTLM Security Support Provider" at 7 // and "NTLM Security Support Provider" at
8 // http://msdn.microsoft.com/en-us/library/aa923611.aspx. 8 // http://msdn.microsoft.com/en-us/library/aa923611.aspx.
9 9
10 #include "net/http/http_auth_handler_ntlm.h" 10 #include "net/http/http_auth_handler_ntlm.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 HttpAuthHandlerNTLM::Factory::~Factory() { 47 HttpAuthHandlerNTLM::Factory::~Factory() {
48 } 48 }
49 49
50 int HttpAuthHandlerNTLM::Factory::CreateAuthHandler( 50 int HttpAuthHandlerNTLM::Factory::CreateAuthHandler(
51 HttpAuthChallengeTokenizer* challenge, 51 HttpAuthChallengeTokenizer* challenge,
52 HttpAuth::Target target, 52 HttpAuth::Target target,
53 const SSLInfo& ssl_info, 53 const SSLInfo& ssl_info,
54 const GURL& origin, 54 const GURL& origin,
55 CreateReason reason, 55 CreateReason reason,
56 int digest_nonce_count, 56 int digest_nonce_count,
57 const BoundNetLog& net_log, 57 const NetLogWithSource& net_log,
58 std::unique_ptr<HttpAuthHandler>* handler) { 58 std::unique_ptr<HttpAuthHandler>* handler) {
59 if (is_unsupported_ || reason == CREATE_PREEMPTIVE) 59 if (is_unsupported_ || reason == CREATE_PREEMPTIVE)
60 return ERR_UNSUPPORTED_AUTH_SCHEME; 60 return ERR_UNSUPPORTED_AUTH_SCHEME;
61 if (max_token_length_ == 0) { 61 if (max_token_length_ == 0) {
62 int rv = DetermineMaxTokenLength(sspi_library_.get(), NTLMSP_NAME, 62 int rv = DetermineMaxTokenLength(sspi_library_.get(), NTLMSP_NAME,
63 &max_token_length_); 63 &max_token_length_);
64 if (rv == ERR_UNSUPPORTED_AUTH_SCHEME) 64 if (rv == ERR_UNSUPPORTED_AUTH_SCHEME)
65 is_unsupported_ = true; 65 is_unsupported_ = true;
66 if (rv != OK) 66 if (rv != OK)
67 return rv; 67 return rv;
68 } 68 }
69 // TODO(cbentzel): Move towards model of parsing in the factory 69 // TODO(cbentzel): Move towards model of parsing in the factory
70 // method and only constructing when valid. 70 // method and only constructing when valid.
71 std::unique_ptr<HttpAuthHandler> tmp_handler(new HttpAuthHandlerNTLM( 71 std::unique_ptr<HttpAuthHandler> tmp_handler(new HttpAuthHandlerNTLM(
72 sspi_library_.get(), max_token_length_, http_auth_preferences())); 72 sspi_library_.get(), max_token_length_, http_auth_preferences()));
73 if (!tmp_handler->InitFromChallenge(challenge, target, ssl_info, origin, 73 if (!tmp_handler->InitFromChallenge(challenge, target, ssl_info, origin,
74 net_log)) 74 net_log))
75 return ERR_INVALID_RESPONSE; 75 return ERR_INVALID_RESPONSE;
76 handler->swap(tmp_handler); 76 handler->swap(tmp_handler);
77 return OK; 77 return OK;
78 } 78 }
79 79
80 } // namespace net 80 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698