| 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 ProxyServiceFactory::CreateProxyConfigService(true); | 203 ProxyServiceFactory::CreateProxyConfigService(true); |
| 204 params->proxy_config_service.reset(proxy_config_service); | 204 params->proxy_config_service.reset(proxy_config_service); |
| 205 profile->GetProxyConfigTracker()->SetChromeProxyConfigService( | 205 profile->GetProxyConfigTracker()->SetChromeProxyConfigService( |
| 206 proxy_config_service); | 206 proxy_config_service); |
| 207 params->profile = profile; | 207 params->profile = profile; |
| 208 profile_params_.reset(params.release()); | 208 profile_params_.reset(params.release()); |
| 209 | 209 |
| 210 ChromeNetworkDelegate::InitializePrefsOnUIThread( | 210 ChromeNetworkDelegate::InitializePrefsOnUIThread( |
| 211 &enable_referrers_, | 211 &enable_referrers_, |
| 212 &enable_do_not_track_, | 212 &enable_do_not_track_, |
| 213 &enable_safesearch_, |
| 213 pref_service); | 214 pref_service); |
| 214 | 215 |
| 215 #if defined(ENABLE_PRINTING) | 216 #if defined(ENABLE_PRINTING) |
| 216 printing_enabled_.Init(prefs::kPrintingEnabled, pref_service, NULL); | 217 printing_enabled_.Init(prefs::kPrintingEnabled, pref_service, NULL); |
| 217 printing_enabled_.MoveToThread(BrowserThread::IO); | 218 printing_enabled_.MoveToThread(BrowserThread::IO); |
| 218 #endif | 219 #endif |
| 219 | 220 |
| 220 // The URLBlacklistManager has to be created on the UI thread to register | 221 // The URLBlacklistManager has to be created on the UI thread to register |
| 221 // observers of |pref_service|, and it also has to clean up on | 222 // observers of |pref_service|, and it also has to clean up on |
| 222 // ShutdownOnUIThread to release these observers on the right thread. | 223 // ShutdownOnUIThread to release these observers on the right thread. |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 url_blacklist_manager_.get(), | 540 url_blacklist_manager_.get(), |
| 540 #if !defined(OS_ANDROID) | 541 #if !defined(OS_ANDROID) |
| 541 ManagedMode::GetURLFilter(), | 542 ManagedMode::GetURLFilter(), |
| 542 #else | 543 #else |
| 543 NULL, | 544 NULL, |
| 544 #endif | 545 #endif |
| 545 profile_params_->profile, | 546 profile_params_->profile, |
| 546 profile_params_->cookie_settings, | 547 profile_params_->cookie_settings, |
| 547 &enable_referrers_, | 548 &enable_referrers_, |
| 548 &enable_do_not_track_, | 549 &enable_do_not_track_, |
| 550 &enable_safesearch_, |
| 549 load_time_stats_)); | 551 load_time_stats_)); |
| 550 | 552 |
| 551 fraudulent_certificate_reporter_.reset( | 553 fraudulent_certificate_reporter_.reset( |
| 552 new chrome_browser_net::ChromeFraudulentCertificateReporter( | 554 new chrome_browser_net::ChromeFraudulentCertificateReporter( |
| 553 main_request_context_.get())); | 555 main_request_context_.get())); |
| 554 | 556 |
| 555 proxy_service_.reset( | 557 proxy_service_.reset( |
| 556 ProxyServiceFactory::CreateProxyService( | 558 ProxyServiceFactory::CreateProxyService( |
| 557 io_thread->net_log(), | 559 io_thread->net_log(), |
| 558 io_thread_globals->proxy_script_fetcher_context.get(), | 560 io_thread_globals->proxy_script_fetcher_context.get(), |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 chrome::kFtpScheme, | 663 chrome::kFtpScheme, |
| 662 new net::FtpProtocolHandler(ftp_transaction_factory, | 664 new net::FtpProtocolHandler(ftp_transaction_factory, |
| 663 ftp_auth_cache)); | 665 ftp_auth_cache)); |
| 664 #endif // !defined(DISABLE_FTP_SUPPORT) | 666 #endif // !defined(DISABLE_FTP_SUPPORT) |
| 665 } | 667 } |
| 666 | 668 |
| 667 void ProfileIOData::ShutdownOnUIThread() { | 669 void ProfileIOData::ShutdownOnUIThread() { |
| 668 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 670 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 669 enable_referrers_.Destroy(); | 671 enable_referrers_.Destroy(); |
| 670 enable_do_not_track_.Destroy(); | 672 enable_do_not_track_.Destroy(); |
| 673 enable_safesearch_.Destroy(); |
| 671 #if !defined(OS_CHROMEOS) | 674 #if !defined(OS_CHROMEOS) |
| 672 enable_metrics_.Destroy(); | 675 enable_metrics_.Destroy(); |
| 673 #endif | 676 #endif |
| 674 safe_browsing_enabled_.Destroy(); | 677 safe_browsing_enabled_.Destroy(); |
| 675 printing_enabled_.Destroy(); | 678 printing_enabled_.Destroy(); |
| 676 session_startup_pref_.Destroy(); | 679 session_startup_pref_.Destroy(); |
| 677 #if defined(ENABLE_CONFIGURATION_POLICY) | 680 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 678 if (url_blacklist_manager_.get()) | 681 if (url_blacklist_manager_.get()) |
| 679 url_blacklist_manager_->ShutdownOnUIThread(); | 682 url_blacklist_manager_->ShutdownOnUIThread(); |
| 680 #endif | 683 #endif |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 params->http_pipelining_enabled = globals->http_pipelining_enabled; | 720 params->http_pipelining_enabled = globals->http_pipelining_enabled; |
| 718 params->testing_fixed_http_port = globals->testing_fixed_http_port; | 721 params->testing_fixed_http_port = globals->testing_fixed_http_port; |
| 719 params->testing_fixed_https_port = globals->testing_fixed_https_port; | 722 params->testing_fixed_https_port = globals->testing_fixed_https_port; |
| 720 | 723 |
| 721 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 724 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 722 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) { | 725 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) { |
| 723 params->trusted_spdy_proxy = command_line.GetSwitchValueASCII( | 726 params->trusted_spdy_proxy = command_line.GetSwitchValueASCII( |
| 724 switches::kTrustedSpdyProxy); | 727 switches::kTrustedSpdyProxy); |
| 725 } | 728 } |
| 726 } | 729 } |
| OLD | NEW |