| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/net/chrome_url_request_context.h" | 5 #include "chrome/browser/net/chrome_url_request_context.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 protocol_handlers)); | 291 protocol_handlers)); |
| 292 } | 292 } |
| 293 | 293 |
| 294 // ---------------------------------------------------------------------------- | 294 // ---------------------------------------------------------------------------- |
| 295 // ChromeURLRequestContext | 295 // ChromeURLRequestContext |
| 296 // ---------------------------------------------------------------------------- | 296 // ---------------------------------------------------------------------------- |
| 297 | 297 |
| 298 ChromeURLRequestContext::ChromeURLRequestContext( | 298 ChromeURLRequestContext::ChromeURLRequestContext( |
| 299 ContextType type, | 299 ContextType type, |
| 300 chrome_browser_net::LoadTimeStats* load_time_stats) | 300 chrome_browser_net::LoadTimeStats* load_time_stats) |
| 301 : weak_factory_(this), | 301 : load_time_stats_(load_time_stats) { |
| 302 load_time_stats_(load_time_stats) { | |
| 303 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 302 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 304 if (load_time_stats_) | 303 if (load_time_stats_) |
| 305 load_time_stats_->RegisterURLRequestContext(this, type); | 304 load_time_stats_->RegisterURLRequestContext(this, type); |
| 306 } | 305 } |
| 307 | 306 |
| 308 ChromeURLRequestContext::~ChromeURLRequestContext() { | 307 ChromeURLRequestContext::~ChromeURLRequestContext() { |
| 309 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 308 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 310 if (load_time_stats_) | 309 if (load_time_stats_) |
| 311 load_time_stats_->UnregisterURLRequestContext(this); | 310 load_time_stats_->UnregisterURLRequestContext(this); |
| 312 } | 311 } |
| 313 | 312 |
| 314 void ChromeURLRequestContext::CopyFrom(ChromeURLRequestContext* other) { | 313 void ChromeURLRequestContext::CopyFrom(ChromeURLRequestContext* other) { |
| 315 URLRequestContext::CopyFrom(other); | 314 URLRequestContext::CopyFrom(other); |
| 316 | 315 |
| 317 // Copy ChromeURLRequestContext parameters. | 316 // Copy ChromeURLRequestContext parameters. |
| 318 } | 317 } |
| OLD | NEW |