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

Side by Side Diff: chrome/browser/io_thread.cc

Issue 2896007: Fix a crash when using negotiate HTTP auth. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Remove the NOTREACHED Created 10 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698