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

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

Issue 3155046: Add support for delegated Kerberos tickets during Negotiate authentication. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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 | chrome/common/chrome_switches.h » ('j') | 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 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/leak_tracker.h" 8 #include "base/leak_tracker.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 deferred_net_log_to_delete_.reset(); 241 deferred_net_log_to_delete_.reset();
242 BrowserProcessSubThread::CleanUpAfterMessageLoopDestruction(); 242 BrowserProcessSubThread::CleanUpAfterMessageLoopDestruction();
243 } 243 }
244 244
245 net::HttpAuthHandlerFactory* IOThread::CreateDefaultAuthHandlerFactory( 245 net::HttpAuthHandlerFactory* IOThread::CreateDefaultAuthHandlerFactory(
246 net::HostResolver* resolver) { 246 net::HostResolver* resolver) {
247 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 247 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
248 248
249 // Get the whitelist information from the command line, create an 249 // Get the whitelist information from the command line, create an
250 // HttpAuthFilterWhitelist, and attach it to the HttpAuthHandlerFactory. 250 // HttpAuthFilterWhitelist, and attach it to the HttpAuthHandlerFactory.
251 net::HttpAuthFilterWhitelist* auth_filter = NULL; 251 net::HttpAuthFilterWhitelist* auth_filter_default_credentials = NULL;
252 if (command_line.HasSwitch(switches::kAuthServerWhitelist)) { 252 if (command_line.HasSwitch(switches::kAuthServerWhitelist)) {
253 std::string auth_server_whitelist = 253 auth_filter_default_credentials = new net::HttpAuthFilterWhitelist(
254 command_line.GetSwitchValueASCII(switches::kAuthServerWhitelist); 254 command_line.GetSwitchValueASCII(switches::kAuthServerWhitelist));
255 // Create a whitelist filter. 255 }
256 auth_filter = new net::HttpAuthFilterWhitelist(); 256 net::HttpAuthFilterWhitelist* auth_filter_delegate = NULL;
257 auth_filter->SetWhitelist(auth_server_whitelist); 257 if (command_line.HasSwitch(switches::kAuthNegotiateDelegateWhitelist)) {
258 auth_filter_delegate = new net::HttpAuthFilterWhitelist(
259 command_line.GetSwitchValueASCII(
260 switches::kAuthNegotiateDelegateWhitelist));
258 } 261 }
259 globals_->url_security_manager.reset( 262 globals_->url_security_manager.reset(
260 net::URLSecurityManager::Create(auth_filter)); 263 net::URLSecurityManager::Create(auth_filter_default_credentials,
264 auth_filter_delegate));
261 265
262 // Determine which schemes are supported. 266 // Determine which schemes are supported.
263 std::string csv_auth_schemes = "basic,digest,ntlm,negotiate"; 267 std::string csv_auth_schemes = "basic,digest,ntlm,negotiate";
264 if (command_line.HasSwitch(switches::kAuthSchemes)) 268 if (command_line.HasSwitch(switches::kAuthSchemes))
265 csv_auth_schemes = StringToLowerASCII( 269 csv_auth_schemes = StringToLowerASCII(
266 command_line.GetSwitchValueASCII(switches::kAuthSchemes)); 270 command_line.GetSwitchValueASCII(switches::kAuthSchemes));
267 std::vector<std::string> supported_schemes; 271 std::vector<std::string> supported_schemes;
268 SplitString(csv_auth_schemes, ',', &supported_schemes); 272 SplitString(csv_auth_schemes, ',', &supported_schemes);
269 273
270 return net::HttpAuthHandlerRegistryFactory::Create( 274 return net::HttpAuthHandlerRegistryFactory::Create(
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 net::HostCache* host_cache = 319 net::HostCache* host_cache =
316 globals_->host_resolver.get()->GetAsHostResolverImpl()->cache(); 320 globals_->host_resolver.get()->GetAsHostResolverImpl()->cache();
317 if (host_cache) 321 if (host_cache)
318 host_cache->clear(); 322 host_cache->clear();
319 } 323 }
320 // Clear all of the passively logged data. 324 // Clear all of the passively logged data.
321 // TODO(eroman): this is a bit heavy handed, really all we need to do is 325 // TODO(eroman): this is a bit heavy handed, really all we need to do is
322 // clear the data pertaining to off the record context. 326 // clear the data pertaining to off the record context.
323 globals_->net_log->passive_collector()->Clear(); 327 globals_->net_log->passive_collector()->Clear();
324 } 328 }
OLDNEW
« 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