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

Unified Diff: chrome/browser/io_thread.cc

Issue 1535019: Kerberos SPN generation for Negotiate challenges (Closed)
Patch Set: Fix to GetCanonicalName that is another CL. Created 10 years, 8 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 | « no previous file | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/io_thread.cc
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 9ab03d44376ef8cc5949c87f5595be80056d7ae0..30da91b739e8945ab9777ffbe558959b94fd7b69 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -22,6 +22,7 @@
#include "net/base/network_change_notifier.h"
#include "net/http/http_auth_filter.h"
#include "net/http/http_auth_handler_factory.h"
+#include "net/http/http_auth_handler_negotiate.h"
#include "net/url_request/url_request.h"
namespace {
@@ -213,6 +214,18 @@ net::HttpAuthHandlerFactory* IOThread::CreateDefaultAuthHandlerFactory() {
registry_factory->SetFilter("negotiate", negotiate_filter);
}
+ // Configure the Negotiate settings for the Kerberos SPN.
+ // TODO(cbentzel): Read the related IE registry settings on Windows builds.
+ // TODO(cbentzel): Ugly use of static_cast here.
+ net::HttpAuthHandlerNegotiate::Factory* negotiate_factory =
+ static_cast<net::HttpAuthHandlerNegotiate::Factory*>(
+ registry_factory->GetSchemeFactory("negotiate"));
+ DCHECK(negotiate_factory);
+ if (command_line.HasSwitch(switches::kDisableAuthNegotiateCnameLookup))
+ negotiate_factory->set_disable_cname_lookup(true);
+ if (command_line.HasSwitch(switches::kEnableAuthNegotiatePort))
+ negotiate_factory->set_use_port(true);
+
return registry_factory;
}
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698