| 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" |
| 11 #include "base/prefs/pref_member.h" | 11 #include "base/prefs/pref_member.h" |
| 12 #include "base/prefs/pref_service.h" | 12 #include "base/prefs/pref_service.h" |
| 13 #include "base/sequenced_task_runner.h" | 13 #include "base/sequenced_task_runner.h" |
| 14 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
| 15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
| 16 #include "base/threading/sequenced_worker_pool.h" | 16 #include "base/threading/sequenced_worker_pool.h" |
| 17 #include "base/threading/worker_pool.h" | 17 #include "base/threading/worker_pool.h" |
| 18 #include "chrome/browser/chrome_notification_types.h" | 18 #include "chrome/browser/chrome_notification_types.h" |
| 19 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 19 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 20 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 20 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
| 21 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" | 21 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" |
| 22 #include "chrome/browser/io_thread.h" | 22 #include "chrome/browser/io_thread.h" |
| 23 #include "chrome/browser/net/chrome_net_log.h" | 23 #include "chrome/browser/net/chrome_net_log.h" |
| 24 #include "chrome/browser/net/chrome_network_delegate.h" | 24 #include "chrome/browser/net/chrome_network_delegate.h" |
| 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_factory.h" | 27 #include "chrome/browser/net/http_server_properties_manager_factory.h" |
| 28 #include "chrome/browser/net/predictor.h" | 28 #include "chrome/browser/net/predictor.h" |
| 29 #include "chrome/browser/net/quota_policy_channel_id_store.h" | |
| 30 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator.
h" | 29 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator.
h" |
| 30 #include "chrome/browser/net/sqlite_channel_id_store.h" |
| 31 #include "chrome/browser/profiles/profile.h" | 31 #include "chrome/browser/profiles/profile.h" |
| 32 #include "chrome/common/chrome_constants.h" | 32 #include "chrome/common/chrome_constants.h" |
| 33 #include "chrome/common/chrome_switches.h" | 33 #include "chrome/common/chrome_switches.h" |
| 34 #include "chrome/common/pref_names.h" | 34 #include "chrome/common/pref_names.h" |
| 35 #include "chrome/common/url_constants.h" | 35 #include "chrome/common/url_constants.h" |
| 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" |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 chrome_browser_net::GetCookieCryptoDelegate(); | 508 chrome_browser_net::GetCookieCryptoDelegate(); |
| 509 cookie_store = content::CreateCookieStore(cookie_config); | 509 cookie_store = content::CreateCookieStore(cookie_config); |
| 510 } | 510 } |
| 511 | 511 |
| 512 main_context->set_cookie_store(cookie_store.get()); | 512 main_context->set_cookie_store(cookie_store.get()); |
| 513 | 513 |
| 514 // Setup server bound cert service. | 514 // Setup server bound cert service. |
| 515 if (!channel_id_service) { | 515 if (!channel_id_service) { |
| 516 DCHECK(!lazy_params_->channel_id_path.empty()); | 516 DCHECK(!lazy_params_->channel_id_path.empty()); |
| 517 | 517 |
| 518 scoped_refptr<QuotaPolicyChannelIDStore> channel_id_db = | 518 scoped_refptr<SQLiteChannelIDStore> channel_id_db = |
| 519 new QuotaPolicyChannelIDStore( | 519 new SQLiteChannelIDStore( |
| 520 lazy_params_->channel_id_path, | 520 lazy_params_->channel_id_path, |
| 521 BrowserThread::GetBlockingPool()->GetSequencedTaskRunner( | 521 BrowserThread::GetBlockingPool()->GetSequencedTaskRunner( |
| 522 BrowserThread::GetBlockingPool()->GetSequenceToken()), | 522 BrowserThread::GetBlockingPool()->GetSequenceToken()), |
| 523 lazy_params_->special_storage_policy.get()); | 523 lazy_params_->special_storage_policy.get()); |
| 524 channel_id_service = new net::ChannelIDService( | 524 channel_id_service = new net::ChannelIDService( |
| 525 new net::DefaultChannelIDStore(channel_id_db.get()), | 525 new net::DefaultChannelIDStore(channel_id_db.get()), |
| 526 base::WorkerPool::GetTaskRunner(true)); | 526 base::WorkerPool::GetTaskRunner(true)); |
| 527 } | 527 } |
| 528 | 528 |
| 529 set_channel_id_service(channel_id_service); | 529 set_channel_id_service(channel_id_service); |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 const base::Closure& completion) { | 826 const base::Closure& completion) { |
| 827 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 827 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 828 DCHECK(initialized()); | 828 DCHECK(initialized()); |
| 829 | 829 |
| 830 DCHECK(transport_security_state()); | 830 DCHECK(transport_security_state()); |
| 831 // Completes synchronously. | 831 // Completes synchronously. |
| 832 transport_security_state()->DeleteAllDynamicDataSince(time); | 832 transport_security_state()->DeleteAllDynamicDataSince(time); |
| 833 DCHECK(http_server_properties_manager_); | 833 DCHECK(http_server_properties_manager_); |
| 834 http_server_properties_manager_->Clear(completion); | 834 http_server_properties_manager_->Clear(completion); |
| 835 } | 835 } |
| OLD | NEW |