Added factories for HttpAuthHandler.

The driving rationale for this change was to prevent choosing an AuthHandler when it
is not supported on the system due to a missing runtime component (such as not being
able to locate a gssapi shared library when seeing a Negotiate scheme).

It also has the advantage (currently unused) of determining some per-auth-scheme properties
only the first time that a challenge for that scheme is seen (such as maximum token length for
the SSPI implementation of NTLM).

Finally, it may make unit tests easier to generate since the factory can be easily mocked.

BUG=34795
TEST=New unit test for HttpAuthHandlerDispatchFactory.

Review URL: http://codereview.chromium.org/582007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39065 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 7a664a0..4be611d5 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -1825,8 +1825,9 @@
   if (target != HttpAuth::AUTH_SERVER ||
       !(request_->load_flags & LOAD_DO_NOT_SEND_AUTH_DATA)) {
     // Find the best authentication challenge that we support.
-    HttpAuth::ChooseBestChallenge(headers, target, auth_origin,
-                                  &auth_handler_[target]);
+    HttpAuth::ChooseBestChallenge(session_->http_auth_handler_factory(),
+                                  headers, target,
+                                  auth_origin, &auth_handler_[target]);
   }
 
   if (!auth_handler_[target]) {