| 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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 lazy_params_->cache_path, | 454 lazy_params_->cache_path, |
| 455 lazy_params_->cache_max_size, | 455 lazy_params_->cache_max_size, |
| 456 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE) | 456 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE) |
| 457 .get()); | 457 .get()); |
| 458 net::HttpNetworkSession::Params network_session_params; | 458 net::HttpNetworkSession::Params network_session_params; |
| 459 PopulateNetworkSessionParams(profile_params, &network_session_params); | 459 PopulateNetworkSessionParams(profile_params, &network_session_params); |
| 460 net::HttpCache* main_cache = new net::HttpCache( | 460 net::HttpCache* main_cache = new net::HttpCache( |
| 461 network_session_params, main_backend); | 461 network_session_params, main_backend); |
| 462 main_cache->InitializeInfiniteCache(lazy_params_->infinite_cache_path); | 462 main_cache->InitializeInfiniteCache(lazy_params_->infinite_cache_path); |
| 463 | 463 |
| 464 #if defined(OS_ANDROID) || defined(OS_IOS) | 464 #if defined(SPDY_PROXY_AUTH_VALUE) |
| 465 data_reduction_proxy::DataReductionProxySettings:: | 465 data_reduction_proxy::DataReductionProxySettings:: |
| 466 InitDataReductionProxySession(main_cache->GetSession()); | 466 InitDataReductionProxySession(main_cache->GetSession(), |
| 467 SPDY_PROXY_AUTH_VALUE); |
| 467 #endif | 468 #endif |
| 468 | 469 |
| 469 if (chrome_browser_net::ShouldUseInMemoryCookiesAndCache()) { | 470 if (chrome_browser_net::ShouldUseInMemoryCookiesAndCache()) { |
| 470 main_cache->set_mode( | 471 main_cache->set_mode( |
| 471 chrome_browser_net::IsCookieRecordMode() ? | 472 chrome_browser_net::IsCookieRecordMode() ? |
| 472 net::HttpCache::RECORD : net::HttpCache::PLAYBACK); | 473 net::HttpCache::RECORD : net::HttpCache::PLAYBACK); |
| 473 } | 474 } |
| 474 | 475 |
| 475 main_http_factory_.reset(main_cache); | 476 main_http_factory_.reset(main_cache); |
| 476 main_context->set_http_transaction_factory(main_cache); | 477 main_context->set_http_transaction_factory(main_cache); |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 const base::Closure& completion) { | 733 const base::Closure& completion) { |
| 733 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 734 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 734 DCHECK(initialized()); | 735 DCHECK(initialized()); |
| 735 | 736 |
| 736 DCHECK(transport_security_state()); | 737 DCHECK(transport_security_state()); |
| 737 // Completes synchronously. | 738 // Completes synchronously. |
| 738 transport_security_state()->DeleteAllDynamicDataSince(time); | 739 transport_security_state()->DeleteAllDynamicDataSince(time); |
| 739 DCHECK(http_server_properties_manager_); | 740 DCHECK(http_server_properties_manager_); |
| 740 http_server_properties_manager_->Clear(completion); | 741 http_server_properties_manager_->Clear(completion); |
| 741 } | 742 } |
| OLD | NEW |