OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "net/http/http_auth.h" |
| 6 #include "net/http/http_auth_scheme_set.h" |
| 7 #include "net/http/http_util.h" |
| 8 |
| 9 namespace net { |
| 10 |
| 11 HttpAuthSchemeSet::HttpAuthSchemeSet() {} |
| 12 |
| 13 HttpAuthSchemeSet::~HttpAuthSchemeSet() {} |
| 14 |
| 15 void HttpAuthSchemeSet::Add(const std::string& scheme) { |
| 16 DCHECK(HttpAuth::IsValidNormalizedScheme(scheme)); |
| 17 schemes_.insert(scheme); |
| 18 } |
| 19 |
| 20 bool HttpAuthSchemeSet::Contains(const std::string& scheme) const { |
| 21 DCHECK(HttpAuth::IsValidNormalizedScheme(scheme)); |
| 22 auto iter = schemes_.find(scheme); |
| 23 return iter != schemes_.end(); |
| 24 } |
| 25 |
| 26 } // namespace |
OLD | NEW |