| 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/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/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 net::DISK_CACHE, | 465 net::DISK_CACHE, |
| 466 ChooseCacheBackendType(), | 466 ChooseCacheBackendType(), |
| 467 lazy_params_->cache_path, | 467 lazy_params_->cache_path, |
| 468 lazy_params_->cache_max_size, | 468 lazy_params_->cache_max_size, |
| 469 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE) | 469 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE) |
| 470 .get()); | 470 .get()); |
| 471 scoped_ptr<net::HttpCache> main_cache = CreateMainHttpFactory( | 471 scoped_ptr<net::HttpCache> main_cache = CreateMainHttpFactory( |
| 472 profile_params, main_backend); | 472 profile_params, main_backend); |
| 473 main_cache->InitializeInfiniteCache(lazy_params_->infinite_cache_path); | 473 main_cache->InitializeInfiniteCache(lazy_params_->infinite_cache_path); |
| 474 | 474 |
| 475 #if defined(OS_ANDROID) || defined(OS_IOS) | |
| 476 #if defined(SPDY_PROXY_AUTH_VALUE) | |
| 477 data_reduction_proxy::DataReductionProxySettings:: | |
| 478 InitDataReductionProxySession( | |
| 479 main_cache->GetSession(), | |
| 480 io_thread_globals->data_reduction_proxy_params.get()); | |
| 481 #endif | |
| 482 #endif | |
| 483 | |
| 484 if (chrome_browser_net::ShouldUseInMemoryCookiesAndCache()) { | 475 if (chrome_browser_net::ShouldUseInMemoryCookiesAndCache()) { |
| 485 main_cache->set_mode( | 476 main_cache->set_mode( |
| 486 chrome_browser_net::IsCookieRecordMode() ? | 477 chrome_browser_net::IsCookieRecordMode() ? |
| 487 net::HttpCache::RECORD : net::HttpCache::PLAYBACK); | 478 net::HttpCache::RECORD : net::HttpCache::PLAYBACK); |
| 488 } | 479 } |
| 489 | 480 |
| 490 main_http_factory_.reset(main_cache.release()); | 481 main_http_factory_.reset(main_cache.release()); |
| 491 main_context->set_http_transaction_factory(main_http_factory_.get()); | 482 main_context->set_http_transaction_factory(main_http_factory_.get()); |
| 492 | 483 |
| 493 #if !defined(DISABLE_FTP_SUPPORT) | 484 #if !defined(DISABLE_FTP_SUPPORT) |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 const base::Closure& completion) { | 754 const base::Closure& completion) { |
| 764 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 755 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 765 DCHECK(initialized()); | 756 DCHECK(initialized()); |
| 766 | 757 |
| 767 DCHECK(transport_security_state()); | 758 DCHECK(transport_security_state()); |
| 768 // Completes synchronously. | 759 // Completes synchronously. |
| 769 transport_security_state()->DeleteAllDynamicDataSince(time); | 760 transport_security_state()->DeleteAllDynamicDataSince(time); |
| 770 DCHECK(http_server_properties_manager_); | 761 DCHECK(http_server_properties_manager_); |
| 771 http_server_properties_manager_->Clear(completion); | 762 http_server_properties_manager_->Clear(completion); |
| 772 } | 763 } |
| OLD | NEW |