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

Unified Diff: net/http/http_auth_handler_negotiate.cc

Issue 1414313002: Allow dynamic updating of authentication policies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing NET_EXPORTs Created 5 years, 1 month 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
Index: net/http/http_auth_handler_negotiate.cc
diff --git a/net/http/http_auth_handler_negotiate.cc b/net/http/http_auth_handler_negotiate.cc
index 3262767ef1cc12fbad183af41d44c7daed802a10..8ced23be2e105b846d31884ef24834364e71c94c 100644
--- a/net/http/http_auth_handler_negotiate.cc
+++ b/net/http/http_auth_handler_negotiate.cc
@@ -30,11 +30,27 @@ HttpAuthHandlerNegotiate::Factory::Factory()
HttpAuthHandlerNegotiate::Factory::~Factory() {
}
+void HttpAuthHandlerNegotiate::Factory::SetNegotiateDisableCnameLookup(
+ bool disable_cname_lookup) {
+ disable_cname_lookup_ = disable_cname_lookup;
+}
+
+void HttpAuthHandlerNegotiate::Factory::SetNegotiateEnablePort(bool use_port) {
+ use_port_ = use_port;
+}
+
void HttpAuthHandlerNegotiate::Factory::set_host_resolver(
HostResolver* resolver) {
resolver_ = resolver;
}
+#if defined(OS_ANDROID)
+void HttpAuthHandlerNegotiate::Factory::SetAndroidAuthNegotiateAccountType(
+ const std::string& account_type) {
+ set_library(make_scoped_ptr(new std::string(account_type)));
+}
+#endif
+
int HttpAuthHandlerNegotiate::Factory::CreateAuthHandler(
HttpAuthChallengeTokenizer* challenge,
HttpAuth::Target target,
@@ -61,7 +77,8 @@ int HttpAuthHandlerNegotiate::Factory::CreateAuthHandler(
url_security_manager(), resolver_,
disable_cname_lookup_, use_port_));
#elif defined(OS_ANDROID)
- if (is_unsupported_ || auth_library_->empty() || reason == CREATE_PREEMPTIVE)
+ if (is_unsupported_ || !auth_library_ || auth_library_->empty() ||
+ reason == CREATE_PREEMPTIVE)
return ERR_UNSUPPORTED_AUTH_SCHEME;
// TODO(cbentzel): Move towards model of parsing in the factory
// method and only constructing when valid.

Powered by Google App Engine
This is Rietveld 408576698