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

Unified Diff: net/http/http_auth_handler_ntlm_win.cc

Issue 1414313002: Allow dynamic updating of authentication policies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to cbentzel@'s comments. Created 5 years 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_handler_ntlm.cc ('k') | net/http/http_auth_preferences.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_handler_ntlm_win.cc
diff --git a/net/http/http_auth_handler_ntlm_win.cc b/net/http/http_auth_handler_ntlm_win.cc
index f471ea97206d1d54c6e356333b25b1b933d60d7e..7aca5f07bd96d431714d6f5ceb6db131ee81384c 100644
--- a/net/http/http_auth_handler_ntlm_win.cc
+++ b/net/http/http_auth_handler_ntlm_win.cc
@@ -12,19 +12,19 @@
#include "base/strings/string_util.h"
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
+#include "net/http/http_auth_preferences.h"
#include "net/http/http_auth_sspi_win.h"
-#include "net/http/url_security_manager.h"
#pragma comment(lib, "secur32.lib")
namespace net {
HttpAuthHandlerNTLM::HttpAuthHandlerNTLM(
- SSPILibrary* sspi_library, ULONG max_token_length,
- URLSecurityManager* url_security_manager)
+ SSPILibrary* sspi_library,
+ ULONG max_token_length,
+ const HttpAuthPreferences* http_auth_preferences)
: auth_sspi_(sspi_library, "NTLM", NTLMSP_NAME, max_token_length),
- url_security_manager_(url_security_manager) {
-}
+ http_auth_preferences_(http_auth_preferences) {}
HttpAuthHandlerNTLM::~HttpAuthHandlerNTLM() {
}
@@ -37,9 +37,9 @@ bool HttpAuthHandlerNTLM::NeedsIdentity() {
bool HttpAuthHandlerNTLM::AllowsDefaultCredentials() {
if (target_ == HttpAuth::AUTH_PROXY)
return true;
- if (!url_security_manager_)
+ if (!http_auth_preferences_)
return false;
- return url_security_manager_->CanUseDefaultCredentials(origin_);
+ return http_auth_preferences_->CanUseDefaultCredentials(origin_);
}
HttpAuthHandlerNTLM::Factory::Factory()
@@ -70,9 +70,8 @@ int HttpAuthHandlerNTLM::Factory::CreateAuthHandler(
}
// TODO(cbentzel): Move towards model of parsing in the factory
// method and only constructing when valid.
- scoped_ptr<HttpAuthHandler> tmp_handler(
- new HttpAuthHandlerNTLM(sspi_library_.get(), max_token_length_,
- url_security_manager()));
+ scoped_ptr<HttpAuthHandler> tmp_handler(new HttpAuthHandlerNTLM(
+ sspi_library_.get(), max_token_length_, http_auth_preferences()));
if (!tmp_handler->InitFromChallenge(challenge, target, origin, net_log))
return ERR_INVALID_RESPONSE;
handler->swap(tmp_handler);
« no previous file with comments | « net/http/http_auth_handler_ntlm.cc ('k') | net/http/http_auth_preferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698