| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "base/logging.h" | 5 #include "base/logging.h" |
| 6 #include "net/http/http_auth_handler.h" | 6 #include "net/http/http_auth_handler.h" |
| 7 | 7 |
| 8 namespace net { | 8 namespace net { |
| 9 | 9 |
| 10 bool HttpAuthHandler::InitFromChallenge(std::string::const_iterator begin, | 10 bool HttpAuthHandler::InitFromChallenge(std::string::const_iterator begin, |
| 11 std::string::const_iterator end, | 11 std::string::const_iterator end, |
| 12 HttpAuth::Target target) { | 12 HttpAuth::Target target, |
| 13 const GURL& origin) { |
| 14 origin_ = origin; |
| 13 target_ = target; | 15 target_ = target; |
| 14 score_ = -1; | 16 score_ = -1; |
| 15 properties_ = -1; | 17 properties_ = -1; |
| 16 | 18 |
| 17 bool ok = Init(begin, end); | 19 bool ok = Init(begin, end); |
| 18 | 20 |
| 19 // Init() is expected to set the scheme, realm, score, and properties. The | 21 // Init() is expected to set the scheme, realm, score, and properties. The |
| 20 // realm may be empty. | 22 // realm may be empty. |
| 21 DCHECK(!ok || !scheme().empty()); | 23 DCHECK(!ok || !scheme().empty()); |
| 22 DCHECK(!ok || score_ != -1); | 24 DCHECK(!ok || score_ != -1); |
| 23 DCHECK(!ok || properties_ != -1); | 25 DCHECK(!ok || properties_ != -1); |
| 24 | 26 |
| 25 return ok; | 27 return ok; |
| 26 } | 28 } |
| 27 | 29 |
| 28 } // namespace net | 30 } // namespace net |
| OLD | NEW |