| OLD | NEW |
| 1 // Copyright (c) 2010 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.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 #include "net/base/net_errors.h" |
| 9 | 9 |
| 10 namespace net { | 10 namespace net { |
| 11 | 11 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 } | 83 } |
| 84 | 84 |
| 85 bool HttpAuthHandler::NeedsIdentity() { | 85 bool HttpAuthHandler::NeedsIdentity() { |
| 86 return true; | 86 return true; |
| 87 } | 87 } |
| 88 | 88 |
| 89 bool HttpAuthHandler::AllowsDefaultCredentials() { | 89 bool HttpAuthHandler::AllowsDefaultCredentials() { |
| 90 return false; | 90 return false; |
| 91 } | 91 } |
| 92 | 92 |
| 93 bool HttpAuthHandler::AllowsExplicitCredentials() { |
| 94 return true; |
| 95 } |
| 96 |
| 93 void HttpAuthHandler::OnGenerateAuthTokenComplete(int rv) { | 97 void HttpAuthHandler::OnGenerateAuthTokenComplete(int rv) { |
| 94 CompletionCallback* callback = original_callback_; | 98 CompletionCallback* callback = original_callback_; |
| 95 FinishGenerateAuthToken(); | 99 FinishGenerateAuthToken(); |
| 96 if (callback) | 100 if (callback) |
| 97 callback->Run(rv); | 101 callback->Run(rv); |
| 98 } | 102 } |
| 99 | 103 |
| 100 void HttpAuthHandler::FinishGenerateAuthToken() { | 104 void HttpAuthHandler::FinishGenerateAuthToken() { |
| 101 // TOOD(cbentzel): Should this be done in OK case only? | 105 // TOOD(cbentzel): Should this be done in OK case only? |
| 102 net_log_.EndEvent(EventTypeFromAuthTarget(target_), NULL); | 106 net_log_.EndEvent(EventTypeFromAuthTarget(target_), NULL); |
| 103 original_callback_ = NULL; | 107 original_callback_ = NULL; |
| 104 } | 108 } |
| 105 | 109 |
| 106 } // namespace net | 110 } // namespace net |
| OLD | NEW |