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 14 matching lines...) Expand all Loading... | |
25 #include "chrome/browser/net/connect_interceptor.h" | 25 #include "chrome/browser/net/connect_interceptor.h" |
26 #include "chrome/browser/net/cookie_store_util.h" | 26 #include "chrome/browser/net/cookie_store_util.h" |
27 #include "chrome/browser/net/http_server_properties_manager.h" | 27 #include "chrome/browser/net/http_server_properties_manager.h" |
28 #include "chrome/browser/net/predictor.h" | 28 #include "chrome/browser/net/predictor.h" |
29 #include "chrome/browser/net/sqlite_server_bound_cert_store.h" | 29 #include "chrome/browser/net/sqlite_server_bound_cert_store.h" |
30 #include "chrome/browser/profiles/profile.h" | 30 #include "chrome/browser/profiles/profile.h" |
31 #include "chrome/common/chrome_constants.h" | 31 #include "chrome/common/chrome_constants.h" |
32 #include "chrome/common/chrome_switches.h" | 32 #include "chrome/common/chrome_switches.h" |
33 #include "chrome/common/pref_names.h" | 33 #include "chrome/common/pref_names.h" |
34 #include "chrome/common/url_constants.h" | 34 #include "chrome/common/url_constants.h" |
35 #include "components/data_reduction_proxy/common/data_reduction_proxy_pref_names .h" | 35 #include "components/data_reduction_proxy/common/data_reduction_proxy_pref_names .h" |
Lei Zhang
2014/06/25 19:31:41
Please remove the data reduction headers too
bengr
2014/06/25 20:07:48
Done.
| |
36 #include "components/domain_reliability/monitor.h" | 36 #include "components/domain_reliability/monitor.h" |
37 #include "content/public/browser/browser_thread.h" | 37 #include "content/public/browser/browser_thread.h" |
38 #include "content/public/browser/cookie_store_factory.h" | 38 #include "content/public/browser/cookie_store_factory.h" |
39 #include "content/public/browser/notification_service.h" | 39 #include "content/public/browser/notification_service.h" |
40 #include "content/public/browser/resource_context.h" | 40 #include "content/public/browser/resource_context.h" |
41 #include "content/public/browser/storage_partition.h" | 41 #include "content/public/browser/storage_partition.h" |
42 #include "extensions/browser/extension_protocols.h" | 42 #include "extensions/browser/extension_protocols.h" |
43 #include "extensions/common/constants.h" | 43 #include "extensions/common/constants.h" |
44 #include "net/base/cache_type.h" | 44 #include "net/base/cache_type.h" |
45 #include "net/base/sdch_dictionary_fetcher.h" | 45 #include "net/base/sdch_dictionary_fetcher.h" |
(...skipping 419 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 |