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

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

Issue 1157333005: [net/http auth] Use strings to identify authentication schemes. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « net/http/http_auth_scheme_set.h ('k') | net/http/http_auth_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« no previous file with comments | « net/http/http_auth_scheme_set.h ('k') | net/http/http_auth_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698