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

Side by Side Diff: net/http/http_auth_handler_digest.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 #include "net/http/http_auth_handler_digest.h" 5 #include "net/http/http_auth_handler_digest.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/md5.h" 10 #include "base/md5.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 nonce_generator_.reset(nonce_generator); 90 nonce_generator_.reset(nonce_generator);
91 } 91 }
92 92
93 int HttpAuthHandlerDigest::Factory::CreateAuthHandler( 93 int HttpAuthHandlerDigest::Factory::CreateAuthHandler(
94 HttpAuthChallengeTokenizer* challenge, 94 HttpAuthChallengeTokenizer* challenge,
95 HttpAuth::Target target, 95 HttpAuth::Target target,
96 const SSLInfo& ssl_info, 96 const SSLInfo& ssl_info,
97 const GURL& origin, 97 const GURL& origin,
98 CreateReason reason, 98 CreateReason reason,
99 int digest_nonce_count, 99 int digest_nonce_count,
100 const BoundNetLog& net_log, 100 const NetLogWithSource& net_log,
101 std::unique_ptr<HttpAuthHandler>* handler) { 101 std::unique_ptr<HttpAuthHandler>* handler) {
102 // TODO(cbentzel): Move towards model of parsing in the factory 102 // TODO(cbentzel): Move towards model of parsing in the factory
103 // method and only constructing when valid. 103 // method and only constructing when valid.
104 std::unique_ptr<HttpAuthHandler> tmp_handler( 104 std::unique_ptr<HttpAuthHandler> tmp_handler(
105 new HttpAuthHandlerDigest(digest_nonce_count, nonce_generator_.get())); 105 new HttpAuthHandlerDigest(digest_nonce_count, nonce_generator_.get()));
106 if (!tmp_handler->InitFromChallenge(challenge, target, ssl_info, origin, 106 if (!tmp_handler->InitFromChallenge(challenge, target, ssl_info, origin,
107 net_log)) 107 net_log))
108 return ERR_INVALID_RESPONSE; 108 return ERR_INVALID_RESPONSE;
109 handler->swap(tmp_handler); 109 handler->swap(tmp_handler);
110 return OK; 110 return OK;
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 // TODO(eroman): Supposedly IIS server requires quotes surrounding qop. 378 // TODO(eroman): Supposedly IIS server requires quotes surrounding qop.
379 authorization += ", qop=" + QopToString(qop_); 379 authorization += ", qop=" + QopToString(qop_);
380 authorization += ", nc=" + nc; 380 authorization += ", nc=" + nc;
381 authorization += ", cnonce=" + HttpUtil::Quote(cnonce); 381 authorization += ", cnonce=" + HttpUtil::Quote(cnonce);
382 } 382 }
383 383
384 return authorization; 384 return authorization;
385 } 385 }
386 386
387 } // namespace net 387 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698