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 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/leak_tracker.h" | 8 #include "base/debug/leak_tracker.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/stl_util-inl.h" | 10 #include "base/stl_util-inl.h" |
11 #include "base/string_number_conversions.h" | 11 #include "base/string_number_conversions.h" |
12 #include "base/string_split.h" | 12 #include "base/string_split.h" |
13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
14 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
15 #include "chrome/browser/browser_thread.h" | 15 #include "chrome/browser/browser_thread.h" |
16 #include "chrome/browser/gpu_process_host.h" | 16 #include "chrome/browser/gpu_process_host.h" |
17 #include "chrome/browser/net/chrome_net_log.h" | 17 #include "chrome/browser/net/chrome_net_log.h" |
18 #include "chrome/browser/net/connect_interceptor.h" | 18 #include "chrome/browser/net/connect_interceptor.h" |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 // run, but before the message loop itself is destroyed, we could safely | 277 // run, but before the message loop itself is destroyed, we could safely |
278 // combine the two cleanups. | 278 // combine the two cleanups. |
279 deferred_net_log_to_delete_.reset(); | 279 deferred_net_log_to_delete_.reset(); |
280 BrowserProcessSubThread::CleanUpAfterMessageLoopDestruction(); | 280 BrowserProcessSubThread::CleanUpAfterMessageLoopDestruction(); |
281 | 281 |
282 // URLRequest instances must NOT outlive the IO thread. | 282 // URLRequest instances must NOT outlive the IO thread. |
283 // | 283 // |
284 // To allow for URLRequests to be deleted from | 284 // To allow for URLRequests to be deleted from |
285 // MessageLoop::DestructionObserver this check has to happen after CleanUp | 285 // MessageLoop::DestructionObserver this check has to happen after CleanUp |
286 // (which runs before DestructionObservers). | 286 // (which runs before DestructionObservers). |
287 base::LeakTracker<URLRequest>::CheckForLeaks(); | 287 base::debug::LeakTracker<URLRequest>::CheckForLeaks(); |
288 } | 288 } |
289 | 289 |
290 net::HttpAuthHandlerFactory* IOThread::CreateDefaultAuthHandlerFactory( | 290 net::HttpAuthHandlerFactory* IOThread::CreateDefaultAuthHandlerFactory( |
291 net::HostResolver* resolver) { | 291 net::HostResolver* resolver) { |
292 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 292 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
293 | 293 |
294 // Get the whitelist information from the command line, create an | 294 // Get the whitelist information from the command line, create an |
295 // HttpAuthFilterWhitelist, and attach it to the HttpAuthHandlerFactory. | 295 // HttpAuthFilterWhitelist, and attach it to the HttpAuthHandlerFactory. |
296 net::HttpAuthFilterWhitelist* auth_filter_default_credentials = NULL; | 296 net::HttpAuthFilterWhitelist* auth_filter_default_credentials = NULL; |
297 if (command_line.HasSwitch(switches::kAuthServerWhitelist)) { | 297 if (command_line.HasSwitch(switches::kAuthServerWhitelist)) { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 net::HostCache* host_cache = | 364 net::HostCache* host_cache = |
365 globals_->host_resolver.get()->GetAsHostResolverImpl()->cache(); | 365 globals_->host_resolver.get()->GetAsHostResolverImpl()->cache(); |
366 if (host_cache) | 366 if (host_cache) |
367 host_cache->clear(); | 367 host_cache->clear(); |
368 } | 368 } |
369 // Clear all of the passively logged data. | 369 // Clear all of the passively logged data. |
370 // TODO(eroman): this is a bit heavy handed, really all we need to do is | 370 // TODO(eroman): this is a bit heavy handed, really all we need to do is |
371 // clear the data pertaining to off the record context. | 371 // clear the data pertaining to off the record context. |
372 globals_->net_log->passive_collector()->Clear(); | 372 globals_->net_log->passive_collector()->Clear(); |
373 } | 373 } |
OLD | NEW |