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

Side by Side Diff: net/http/http_auth_controller.cc

Issue 1131963003: Switch //net functions to use SchemeIsCryptographic() instead of SchemeIsSecure(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing. Created 5 years, 7 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) 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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698