OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/profiles/profile_impl_io_data.h" | 5 #include "chrome/browser/profiles/profile_impl_io_data.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 if (record_mode || playback_mode) { | 386 if (record_mode || playback_mode) { |
387 main_cache->set_mode( | 387 main_cache->set_mode( |
388 record_mode ? net::HttpCache::RECORD : net::HttpCache::PLAYBACK); | 388 record_mode ? net::HttpCache::RECORD : net::HttpCache::PLAYBACK); |
389 } | 389 } |
390 | 390 |
391 main_http_factory_.reset(main_cache); | 391 main_http_factory_.reset(main_cache); |
392 media_http_factory_.reset(media_cache); | 392 media_http_factory_.reset(media_cache); |
393 main_context->set_http_transaction_factory(main_cache); | 393 main_context->set_http_transaction_factory(main_cache); |
394 media_request_context_->set_http_transaction_factory(media_cache); | 394 media_request_context_->set_http_transaction_factory(media_cache); |
395 | 395 |
396 ftp_factory_.reset( | 396 main_context->set_ftp_transaction_factory( |
397 new net::FtpNetworkLayer(io_thread_globals->host_resolver.get())); | 397 new net::FtpNetworkLayer(io_thread_globals->host_resolver.get())); |
398 main_context->set_ftp_transaction_factory(ftp_factory_.get()); | |
399 | 398 |
400 main_context->set_chrome_url_data_manager_backend( | 399 main_context->set_chrome_url_data_manager_backend( |
401 chrome_url_data_manager_backend()); | 400 chrome_url_data_manager_backend()); |
402 | 401 |
403 main_context->set_job_factory(job_factory()); | 402 main_context->set_job_factory(job_factory()); |
404 media_request_context_->set_job_factory(job_factory()); | 403 media_request_context_->set_job_factory(job_factory()); |
405 extensions_context->set_job_factory(job_factory()); | 404 extensions_context->set_job_factory(job_factory()); |
406 | 405 |
407 job_factory()->AddInterceptor( | 406 job_factory()->AddInterceptor( |
408 new chrome_browser_net::ConnectInterceptor(predictor_.get())); | 407 new chrome_browser_net::ConnectInterceptor(predictor_.get())); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 scoped_refptr<ChromeURLRequestContext> | 484 scoped_refptr<ChromeURLRequestContext> |
486 ProfileImplIOData::AcquireIsolatedAppRequestContext( | 485 ProfileImplIOData::AcquireIsolatedAppRequestContext( |
487 scoped_refptr<ChromeURLRequestContext> main_context, | 486 scoped_refptr<ChromeURLRequestContext> main_context, |
488 const std::string& app_id) const { | 487 const std::string& app_id) const { |
489 // We create per-app contexts on demand, unlike the others above. | 488 // We create per-app contexts on demand, unlike the others above. |
490 scoped_refptr<ChromeURLRequestContext> app_request_context = | 489 scoped_refptr<ChromeURLRequestContext> app_request_context = |
491 InitializeAppRequestContext(main_context, app_id); | 490 InitializeAppRequestContext(main_context, app_id); |
492 DCHECK(app_request_context); | 491 DCHECK(app_request_context); |
493 return app_request_context; | 492 return app_request_context; |
494 } | 493 } |
OLD | NEW |