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

Unified Diff: ios/chrome/browser/ios_chrome_io_thread.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 | « ios/chrome/browser/ios_chrome_io_thread.h ('k') | net/android/http_auth_negotiate_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ios_chrome_io_thread.cc
diff --git a/ios/chrome/browser/ios_chrome_io_thread.cc b/ios/chrome/browser/ios_chrome_io_thread.cc
index 7a8aa51698d521bdaadaa8b7436c5b420b5eee10..017303f27cf6ee3eb474a836e6fa0be573548139 100644
--- a/ios/chrome/browser/ios_chrome_io_thread.cc
+++ b/ios/chrome/browser/ios_chrome_io_thread.cc
@@ -59,6 +59,7 @@
#include "net/dns/mapped_host_resolver.h"
#include "net/http/http_auth_filter.h"
#include "net/http/http_auth_handler_factory.h"
+#include "net/http/http_auth_preferences.h"
#include "net/http/http_network_layer.h"
#include "net/http/http_network_session.h"
#include "net/http/http_server_properties_impl.h"
@@ -408,8 +409,7 @@ void IOSChromeIOThread::Init() {
globals_->ssl_config_service = GetSSLConfigService();
- globals_->http_auth_handler_factory.reset(
- CreateDefaultAuthHandlerFactory(globals_->host_resolver.get()));
+ CreateDefaultAuthHandlerFactory();
globals_->http_server_properties.reset(new net::HttpServerPropertiesImpl());
// In-memory cookie store.
globals_->system_cookie_store = new net::CookieMonster(nullptr, nullptr);
@@ -563,21 +563,16 @@ void IOSChromeIOThread::ConfigureNPNGlobals(
}
}
-net::HttpAuthHandlerFactory* IOSChromeIOThread::CreateDefaultAuthHandlerFactory(
- net::HostResolver* resolver) {
- globals_->url_security_manager.reset(net::URLSecurityManager::Create(
- nullptr /* whitelist_default */, nullptr /* whitelist_delegate */));
- std::vector<std::string> supported_schemes = base::SplitString(
- kSupportedAuthSchemes, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
-
- scoped_ptr<net::HttpAuthHandlerRegistryFactory> registry_factory(
+void IOSChromeIOThread::CreateDefaultAuthHandlerFactory() {
+ std::vector<std::string> supported_schemes =
+ base::SplitString(kSupportedAuthSchemes, ",", base::TRIM_WHITESPACE,
+ base::SPLIT_WANT_NONEMPTY);
+ globals_->http_auth_preferences.reset(
+ new net::HttpAuthPreferences(supported_schemes, std::string()));
+ globals_->http_auth_handler_factory =
net::HttpAuthHandlerRegistryFactory::Create(
- supported_schemes, globals_->url_security_manager.get(), resolver,
- std::string() /* gssapi_library_name */,
- std::string() /* auth_android_negotiate_account_type */,
- false /* negotiate_disable_cname_lookup */,
- false /* negotiate_enable_port */));
- return registry_factory.release();
+ globals_->http_auth_preferences.get(), globals_->host_resolver.get())
+ .Pass();
}
void IOSChromeIOThread::ClearHostCache() {
« no previous file with comments | « ios/chrome/browser/ios_chrome_io_thread.h ('k') | net/android/http_auth_negotiate_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698