| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/io_thread.h" | 5 #include "chrome/browser/io_thread.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/leak_tracker.h" | 7 #include "base/leak_tracker.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/chrome_thread.h" | 10 #include "chrome/browser/chrome_thread.h" |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 registry_factory->SetURLSecurityManager("negotiate", | 283 registry_factory->SetURLSecurityManager("negotiate", |
| 284 globals_->url_security_manager.get()); | 284 globals_->url_security_manager.get()); |
| 285 if (negotiate_auth_enabled) { | 285 if (negotiate_auth_enabled) { |
| 286 // Configure the Negotiate settings for the Kerberos SPN. | 286 // Configure the Negotiate settings for the Kerberos SPN. |
| 287 // TODO(cbentzel): Read the related IE registry settings on Windows builds. | 287 // TODO(cbentzel): Read the related IE registry settings on Windows builds. |
| 288 // TODO(cbentzel): Ugly use of static_cast here. | 288 // TODO(cbentzel): Ugly use of static_cast here. |
| 289 net::HttpAuthHandlerNegotiate::Factory* negotiate_factory = | 289 net::HttpAuthHandlerNegotiate::Factory* negotiate_factory = |
| 290 static_cast<net::HttpAuthHandlerNegotiate::Factory*>( | 290 static_cast<net::HttpAuthHandlerNegotiate::Factory*>( |
| 291 registry_factory->GetSchemeFactory("negotiate")); | 291 registry_factory->GetSchemeFactory("negotiate")); |
| 292 DCHECK(negotiate_factory); | 292 DCHECK(negotiate_factory); |
| 293 negotiate_factory->set_host_resolver(resolver); |
| 293 if (command_line.HasSwitch(switches::kDisableAuthNegotiateCnameLookup)) | 294 if (command_line.HasSwitch(switches::kDisableAuthNegotiateCnameLookup)) |
| 294 negotiate_factory->set_disable_cname_lookup(true); | 295 negotiate_factory->set_disable_cname_lookup(true); |
| 295 if (command_line.HasSwitch(switches::kEnableAuthNegotiatePort)) | 296 if (command_line.HasSwitch(switches::kEnableAuthNegotiatePort)) |
| 296 negotiate_factory->set_use_port(true); | 297 negotiate_factory->set_use_port(true); |
| 297 } else { | 298 } else { |
| 298 // Disable the Negotiate authentication handler. | 299 // Disable the Negotiate authentication handler. |
| 299 registry_factory->RegisterSchemeFactory("negotiate", NULL); | 300 registry_factory->RegisterSchemeFactory("negotiate", NULL); |
| 300 } | 301 } |
| 301 return registry_factory; | 302 return registry_factory; |
| 302 } | 303 } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 net::HostCache* host_cache = | 351 net::HostCache* host_cache = |
| 351 globals_->host_resolver.get()->GetAsHostResolverImpl()->cache(); | 352 globals_->host_resolver.get()->GetAsHostResolverImpl()->cache(); |
| 352 if (host_cache) | 353 if (host_cache) |
| 353 host_cache->clear(); | 354 host_cache->clear(); |
| 354 } | 355 } |
| 355 // Clear all of the passively logged data. | 356 // Clear all of the passively logged data. |
| 356 // TODO(eroman): this is a bit heavy handed, really all we need to do is | 357 // TODO(eroman): this is a bit heavy handed, really all we need to do is |
| 357 // clear the data pertaining to off the record context. | 358 // clear the data pertaining to off the record context. |
| 358 globals_->net_log->passive_collector()->Clear(); | 359 globals_->net_log->passive_collector()->Clear(); |
| 359 } | 360 } |
| OLD | NEW |