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/url_security_manager.h" | 5 #include "net/http/url_security_manager.h" |
6 | 6 |
7 #include "net/http/http_auth_filter.h" | 7 #include "net/http/http_auth_filter.h" |
8 | 8 |
9 namespace net { | 9 namespace net { |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 return whitelist_default_->IsValid(auth_origin, HttpAuth::AUTH_SERVER); | 23 return whitelist_default_->IsValid(auth_origin, HttpAuth::AUTH_SERVER); |
24 return false; | 24 return false; |
25 } | 25 } |
26 | 26 |
27 bool URLSecurityManagerWhitelist::CanDelegate(const GURL& auth_origin) const { | 27 bool URLSecurityManagerWhitelist::CanDelegate(const GURL& auth_origin) const { |
28 if (whitelist_delegate_.get()) | 28 if (whitelist_delegate_.get()) |
29 return whitelist_delegate_->IsValid(auth_origin, HttpAuth::AUTH_SERVER); | 29 return whitelist_delegate_->IsValid(auth_origin, HttpAuth::AUTH_SERVER); |
30 return false; | 30 return false; |
31 } | 31 } |
32 | 32 |
| 33 void URLSecurityManagerWhitelist::SetDefaultWhitelist( |
| 34 const HttpAuthFilter* whitelist_default) { |
| 35 whitelist_default_.reset(whitelist_default); |
| 36 } |
| 37 |
| 38 void URLSecurityManagerWhitelist::SetDelegateWhitelist( |
| 39 const HttpAuthFilter* whitelist_delegate) { |
| 40 whitelist_delegate_.reset(whitelist_delegate); |
| 41 } |
| 42 |
| 43 bool URLSecurityManagerWhitelist::HasDefaultWhitelist() const { |
| 44 return whitelist_default_.get() == nullptr; |
| 45 } |
| 46 |
33 } // namespace net | 47 } // namespace net |
OLD | NEW |