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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 .get()); | 477 .get()); |
478 net::HttpNetworkSession::Params network_session_params; | 478 net::HttpNetworkSession::Params network_session_params; |
479 PopulateNetworkSessionParams(profile_params, &network_session_params); | 479 PopulateNetworkSessionParams(profile_params, &network_session_params); |
480 net::HttpCache* main_cache = new net::HttpCache( | 480 net::HttpCache* main_cache = new net::HttpCache( |
481 network_session_params, main_backend); | 481 network_session_params, main_backend); |
482 main_cache->InitializeInfiniteCache(lazy_params_->infinite_cache_path); | 482 main_cache->InitializeInfiniteCache(lazy_params_->infinite_cache_path); |
483 | 483 |
484 #if defined(OS_ANDROID) || defined(OS_IOS) | 484 #if defined(OS_ANDROID) || defined(OS_IOS) |
485 #if defined(SPDY_PROXY_AUTH_VALUE) | 485 #if defined(SPDY_PROXY_AUTH_VALUE) |
486 data_reduction_proxy::DataReductionProxySettings:: | 486 data_reduction_proxy::DataReductionProxySettings:: |
487 InitDataReductionProxySession( | 487 InitDataReductionProxySession(main_cache->GetSession(), |
488 main_cache->GetSession(), | 488 SPDY_PROXY_AUTH_VALUE); |
489 io_thread_globals->data_reduction_proxy_params.get()); | |
490 #endif | 489 #endif |
491 #endif | 490 #endif |
492 | 491 |
493 if (chrome_browser_net::ShouldUseInMemoryCookiesAndCache()) { | 492 if (chrome_browser_net::ShouldUseInMemoryCookiesAndCache()) { |
494 main_cache->set_mode( | 493 main_cache->set_mode( |
495 chrome_browser_net::IsCookieRecordMode() ? | 494 chrome_browser_net::IsCookieRecordMode() ? |
496 net::HttpCache::RECORD : net::HttpCache::PLAYBACK); | 495 net::HttpCache::RECORD : net::HttpCache::PLAYBACK); |
497 } | 496 } |
498 | 497 |
499 main_http_factory_.reset(main_cache); | 498 main_http_factory_.reset(main_cache); |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 domain_reliability::DomainReliabilityClearMode mode, | 768 domain_reliability::DomainReliabilityClearMode mode, |
770 const base::Closure& completion) { | 769 const base::Closure& completion) { |
771 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 770 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
772 DCHECK(initialized()); | 771 DCHECK(initialized()); |
773 | 772 |
774 if (domain_reliability_monitor_) | 773 if (domain_reliability_monitor_) |
775 domain_reliability_monitor_->ClearBrowsingData(mode); | 774 domain_reliability_monitor_->ClearBrowsingData(mode); |
776 | 775 |
777 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, completion); | 776 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, completion); |
778 } | 777 } |
OLD | NEW |