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

Unified Diff: net/http/http_auth_scheme_set.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_auth_multi_round_parse.cc ('k') | net/http/http_auth_scheme_set.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_scheme_set.h
diff --git a/net/http/http_auth_scheme_set.h b/net/http/http_auth_scheme_set.h
new file mode 100644
index 0000000000000000000000000000000000000000..576153545b64bf5de7a92730ce6c8811da6093e7
--- /dev/null
+++ b/net/http/http_auth_scheme_set.h
@@ -0,0 +1,33 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_HTTP_HTTP_AUTH_SCHEME_SET_H_
+#define NET_HTTP_HTTP_AUTH_SCHEME_SET_H_
+
+#include <set>
+#include <string>
+
+#include "net/base/net_export.h"
+
+namespace net {
+
+// A set of HTTP auth schemes.
+class NET_EXPORT HttpAuthSchemeSet {
+ public:
+ HttpAuthSchemeSet();
+ ~HttpAuthSchemeSet();
+
+ // |scheme| needs to be normalized.
+ void Add(const std::string& scheme);
+
+ // |scheme| needs to be normalized.
+ bool Contains(const std::string& scheme) const;
+
+ private:
+ std::set<std::string> schemes_;
+};
+
+} // namespace net
+
+#endif // NET_HTTP_HTTP_AUTH_SCHEME_SET_H_
« no previous file with comments | « net/http/http_auth_multi_round_parse.cc ('k') | net/http/http_auth_scheme_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698