| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_controller.h" | 5 #include "net/http/http_auth_controller.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 AUTH_TARGET_PROXY = 0, | 63 AUTH_TARGET_PROXY = 0, |
| 64 AUTH_TARGET_SECURE_PROXY, | 64 AUTH_TARGET_SECURE_PROXY, |
| 65 AUTH_TARGET_SERVER, | 65 AUTH_TARGET_SERVER, |
| 66 AUTH_TARGET_SECURE_SERVER, | 66 AUTH_TARGET_SECURE_SERVER, |
| 67 AUTH_TARGET_MAX, | 67 AUTH_TARGET_MAX, |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 AuthTarget DetermineAuthTarget(const HttpAuthHandler* handler) { | 70 AuthTarget DetermineAuthTarget(const HttpAuthHandler* handler) { |
| 71 switch (handler->target()) { | 71 switch (handler->target()) { |
| 72 case HttpAuth::AUTH_PROXY: | 72 case HttpAuth::AUTH_PROXY: |
| 73 if (handler->origin().SchemeIsSecure()) | 73 if (handler->origin().SchemeIsCryptographic()) |
| 74 return AUTH_TARGET_SECURE_PROXY; | 74 return AUTH_TARGET_SECURE_PROXY; |
| 75 else | 75 else |
| 76 return AUTH_TARGET_PROXY; | 76 return AUTH_TARGET_PROXY; |
| 77 case HttpAuth::AUTH_SERVER: | 77 case HttpAuth::AUTH_SERVER: |
| 78 if (handler->origin().SchemeIsSecure()) | 78 if (handler->origin().SchemeIsCryptographic()) |
| 79 return AUTH_TARGET_SECURE_SERVER; | 79 return AUTH_TARGET_SECURE_SERVER; |
| 80 else | 80 else |
| 81 return AUTH_TARGET_SERVER; | 81 return AUTH_TARGET_SERVER; |
| 82 default: | 82 default: |
| 83 NOTREACHED(); | 83 NOTREACHED(); |
| 84 return AUTH_TARGET_MAX; | 84 return AUTH_TARGET_MAX; |
| 85 } | 85 } |
| 86 } | 86 } |
| 87 | 87 |
| 88 // Records the number of authentication events per authentication scheme. | 88 // Records the number of authentication events per authentication scheme. |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 DCHECK(CalledOnValidThread()); | 569 DCHECK(CalledOnValidThread()); |
| 570 disabled_schemes_.insert(scheme); | 570 disabled_schemes_.insert(scheme); |
| 571 } | 571 } |
| 572 | 572 |
| 573 void HttpAuthController::DisableEmbeddedIdentity() { | 573 void HttpAuthController::DisableEmbeddedIdentity() { |
| 574 DCHECK(CalledOnValidThread()); | 574 DCHECK(CalledOnValidThread()); |
| 575 embedded_identity_used_ = true; | 575 embedded_identity_used_ = true; |
| 576 } | 576 } |
| 577 | 577 |
| 578 } // namespace net | 578 } // namespace net |
| OLD | NEW |