| 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/debug/leak_tracker.h" | 8 #include "base/debug/leak_tracker.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 this, | 226 this, |
| 227 &IOThread::ChangedToOnTheRecordOnIOThread)); | 227 &IOThread::ChangedToOnTheRecordOnIOThread)); |
| 228 } | 228 } |
| 229 | 229 |
| 230 net::ProxyScriptFetcher* IOThread::CreateAndRegisterProxyScriptFetcher( | 230 net::ProxyScriptFetcher* IOThread::CreateAndRegisterProxyScriptFetcher( |
| 231 URLRequestContext* url_request_context) { | 231 URLRequestContext* url_request_context) { |
| 232 return new ManagedProxyScriptFetcher(url_request_context, this); | 232 return new ManagedProxyScriptFetcher(url_request_context, this); |
| 233 } | 233 } |
| 234 | 234 |
| 235 void IOThread::Init() { | 235 void IOThread::Init() { |
| 236 #if defined(OS_LINUX) | 236 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 237 // TODO(evan): test and enable this on all platforms. | 237 // TODO(evan): test and enable this on all platforms. |
| 238 // Though this thread is called the "IO" thread, it actually just routes | 238 // Though this thread is called the "IO" thread, it actually just routes |
| 239 // messages around; it shouldn't be allowed to perform any blocking disk I/O. | 239 // messages around; it shouldn't be allowed to perform any blocking disk I/O. |
| 240 base::ThreadRestrictions::SetIOAllowed(false); | 240 base::ThreadRestrictions::SetIOAllowed(false); |
| 241 #endif | 241 #endif |
| 242 | 242 |
| 243 BrowserProcessSubThread::Init(); | 243 BrowserProcessSubThread::Init(); |
| 244 | 244 |
| 245 DCHECK_EQ(MessageLoop::TYPE_IO, message_loop()->type()); | 245 DCHECK_EQ(MessageLoop::TYPE_IO, message_loop()->type()); |
| 246 | 246 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 net::HostCache* host_cache = | 411 net::HostCache* host_cache = |
| 412 globals_->host_resolver.get()->GetAsHostResolverImpl()->cache(); | 412 globals_->host_resolver.get()->GetAsHostResolverImpl()->cache(); |
| 413 if (host_cache) | 413 if (host_cache) |
| 414 host_cache->clear(); | 414 host_cache->clear(); |
| 415 } | 415 } |
| 416 // Clear all of the passively logged data. | 416 // Clear all of the passively logged data. |
| 417 // TODO(eroman): this is a bit heavy handed, really all we need to do is | 417 // TODO(eroman): this is a bit heavy handed, really all we need to do is |
| 418 // clear the data pertaining to off the record context. | 418 // clear the data pertaining to off the record context. |
| 419 globals_->net_log->passive_collector()->Clear(); | 419 globals_->net_log->passive_collector()->Clear(); |
| 420 } | 420 } |
| OLD | NEW |