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_io_data.h" | 5 #include "chrome/browser/profiles/profile_io_data.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 ProxyServiceFactory::CreateProxyConfigService(true); | 184 ProxyServiceFactory::CreateProxyConfigService(true); |
185 params->proxy_config_service.reset(proxy_config_service); | 185 params->proxy_config_service.reset(proxy_config_service); |
186 profile->GetProxyConfigTracker()->SetChromeProxyConfigService( | 186 profile->GetProxyConfigTracker()->SetChromeProxyConfigService( |
187 proxy_config_service); | 187 proxy_config_service); |
188 params->profile = profile; | 188 params->profile = profile; |
189 profile_params_.reset(params.release()); | 189 profile_params_.reset(params.release()); |
190 | 190 |
191 ChromeNetworkDelegate::InitializePrefsOnUIThread( | 191 ChromeNetworkDelegate::InitializePrefsOnUIThread( |
192 &enable_referrers_, | 192 &enable_referrers_, |
193 &enable_do_not_track_, | 193 &enable_do_not_track_, |
| 194 &force_safesearch_, |
194 pref_service); | 195 pref_service); |
195 | 196 |
196 #if defined(ENABLE_PRINTING) | 197 #if defined(ENABLE_PRINTING) |
197 printing_enabled_.Init(prefs::kPrintingEnabled, pref_service, NULL); | 198 printing_enabled_.Init(prefs::kPrintingEnabled, pref_service, NULL); |
198 printing_enabled_.MoveToThread( | 199 printing_enabled_.MoveToThread( |
199 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 200 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
200 #endif | 201 #endif |
201 chrome_http_user_agent_settings_.reset( | 202 chrome_http_user_agent_settings_.reset( |
202 new ChromeHttpUserAgentSettings(pref_service)); | 203 new ChromeHttpUserAgentSettings(pref_service)); |
203 | 204 |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 url_blacklist_manager_.get(), | 527 url_blacklist_manager_.get(), |
527 #if !defined(OS_ANDROID) | 528 #if !defined(OS_ANDROID) |
528 ManagedMode::GetURLFilter(), | 529 ManagedMode::GetURLFilter(), |
529 #else | 530 #else |
530 NULL, | 531 NULL, |
531 #endif | 532 #endif |
532 profile_params_->profile, | 533 profile_params_->profile, |
533 profile_params_->cookie_settings, | 534 profile_params_->cookie_settings, |
534 &enable_referrers_, | 535 &enable_referrers_, |
535 &enable_do_not_track_, | 536 &enable_do_not_track_, |
| 537 &force_safesearch_, |
536 load_time_stats_)); | 538 load_time_stats_)); |
537 | 539 |
538 fraudulent_certificate_reporter_.reset( | 540 fraudulent_certificate_reporter_.reset( |
539 new chrome_browser_net::ChromeFraudulentCertificateReporter( | 541 new chrome_browser_net::ChromeFraudulentCertificateReporter( |
540 main_request_context_.get())); | 542 main_request_context_.get())); |
541 | 543 |
542 proxy_service_.reset( | 544 proxy_service_.reset( |
543 ProxyServiceFactory::CreateProxyService( | 545 ProxyServiceFactory::CreateProxyService( |
544 io_thread->net_log(), | 546 io_thread->net_log(), |
545 io_thread_globals->proxy_script_fetcher_context.get(), | 547 io_thread_globals->proxy_script_fetcher_context.get(), |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 chrome::kFtpScheme, | 649 chrome::kFtpScheme, |
648 new net::FtpProtocolHandler(ftp_transaction_factory, | 650 new net::FtpProtocolHandler(ftp_transaction_factory, |
649 ftp_auth_cache)); | 651 ftp_auth_cache)); |
650 #endif // !defined(DISABLE_FTP_SUPPORT) | 652 #endif // !defined(DISABLE_FTP_SUPPORT) |
651 } | 653 } |
652 | 654 |
653 void ProfileIOData::ShutdownOnUIThread() { | 655 void ProfileIOData::ShutdownOnUIThread() { |
654 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 656 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
655 enable_referrers_.Destroy(); | 657 enable_referrers_.Destroy(); |
656 enable_do_not_track_.Destroy(); | 658 enable_do_not_track_.Destroy(); |
| 659 force_safesearch_.Destroy(); |
657 #if !defined(OS_CHROMEOS) | 660 #if !defined(OS_CHROMEOS) |
658 enable_metrics_.Destroy(); | 661 enable_metrics_.Destroy(); |
659 #endif | 662 #endif |
660 safe_browsing_enabled_.Destroy(); | 663 safe_browsing_enabled_.Destroy(); |
661 printing_enabled_.Destroy(); | 664 printing_enabled_.Destroy(); |
662 session_startup_pref_.Destroy(); | 665 session_startup_pref_.Destroy(); |
663 #if defined(ENABLE_CONFIGURATION_POLICY) | 666 #if defined(ENABLE_CONFIGURATION_POLICY) |
664 if (url_blacklist_manager_.get()) | 667 if (url_blacklist_manager_.get()) |
665 url_blacklist_manager_->ShutdownOnUIThread(); | 668 url_blacklist_manager_->ShutdownOnUIThread(); |
666 #endif | 669 #endif |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 params->http_pipelining_enabled = globals->http_pipelining_enabled; | 708 params->http_pipelining_enabled = globals->http_pipelining_enabled; |
706 params->testing_fixed_http_port = globals->testing_fixed_http_port; | 709 params->testing_fixed_http_port = globals->testing_fixed_http_port; |
707 params->testing_fixed_https_port = globals->testing_fixed_https_port; | 710 params->testing_fixed_https_port = globals->testing_fixed_https_port; |
708 | 711 |
709 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 712 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
710 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) { | 713 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) { |
711 params->trusted_spdy_proxy = command_line.GetSwitchValueASCII( | 714 params->trusted_spdy_proxy = command_line.GetSwitchValueASCII( |
712 switches::kTrustedSpdyProxy); | 715 switches::kTrustedSpdyProxy); |
713 } | 716 } |
714 } | 717 } |
OLD | NEW |