| OLD | NEW |
| 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.h" | 5 #include "net/http/http_auth_handler.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "net/base/net_errors.h" |
| 8 | 9 |
| 9 namespace net { | 10 namespace net { |
| 10 | 11 |
| 11 bool HttpAuthHandler::InitFromChallenge( | 12 bool HttpAuthHandler::InitFromChallenge( |
| 12 HttpAuth::ChallengeTokenizer* challenge, | 13 HttpAuth::ChallengeTokenizer* challenge, |
| 13 HttpAuth::Target target, | 14 HttpAuth::Target target, |
| 14 const GURL& origin) { | 15 const GURL& origin) { |
| 15 origin_ = origin; | 16 origin_ = origin; |
| 16 target_ = target; | 17 target_ = target; |
| 17 score_ = -1; | 18 score_ = -1; |
| 18 properties_ = -1; | 19 properties_ = -1; |
| 19 | 20 |
| 20 bool ok = Init(challenge); | 21 bool ok = Init(challenge); |
| 21 | 22 |
| 22 // Init() is expected to set the scheme, realm, score, and properties. The | 23 // Init() is expected to set the scheme, realm, score, and properties. The |
| 23 // realm may be empty. | 24 // realm may be empty. |
| 24 DCHECK(!ok || !scheme().empty()); | 25 DCHECK(!ok || !scheme().empty()); |
| 25 DCHECK(!ok || score_ != -1); | 26 DCHECK(!ok || score_ != -1); |
| 26 DCHECK(!ok || properties_ != -1); | 27 DCHECK(!ok || properties_ != -1); |
| 27 | 28 |
| 28 return ok; | 29 return ok; |
| 29 } | 30 } |
| 30 | 31 |
| 32 int HttpAuthHandler::ResolveCanonicalName(net::HostResolver* host_resolver, |
| 33 CompletionCallback* callback, |
| 34 const BoundNetLog& net_log) { |
| 35 NOTREACHED(); |
| 36 LOG(ERROR) << ErrorToString(ERR_NOT_IMPLEMENTED); |
| 37 return ERR_NOT_IMPLEMENTED; |
| 38 } |
| 39 |
| 31 } // namespace net | 40 } // namespace net |
| OLD | NEW |