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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 } | 445 } |
446 } | 446 } |
447 #endif | 447 #endif |
448 | 448 |
449 params->profile = profile; | 449 params->profile = profile; |
450 profile_params_.reset(params.release()); | 450 profile_params_.reset(params.release()); |
451 | 451 |
452 ChromeNetworkDelegate::InitializePrefsOnUIThread( | 452 ChromeNetworkDelegate::InitializePrefsOnUIThread( |
453 &enable_referrers_, | 453 &enable_referrers_, |
454 &enable_do_not_track_, | 454 &enable_do_not_track_, |
455 &force_safesearch_, | |
456 &force_google_safesearch_, | 455 &force_google_safesearch_, |
457 &force_youtube_safety_mode_, | 456 &force_youtube_safety_mode_, |
458 pref_service); | 457 pref_service); |
459 | 458 |
460 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy = | 459 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy = |
461 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); | 460 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); |
462 | 461 |
463 chrome_http_user_agent_settings_.reset( | 462 chrome_http_user_agent_settings_.reset( |
464 new ChromeHttpUserAgentSettings(pref_service)); | 463 new ChromeHttpUserAgentSettings(pref_service)); |
465 | 464 |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1018 network_delegate->set_extension_info_map( | 1017 network_delegate->set_extension_info_map( |
1019 profile_params_->extension_info_map.get()); | 1018 profile_params_->extension_info_map.get()); |
1020 #endif | 1019 #endif |
1021 #if defined(ENABLE_CONFIGURATION_POLICY) | 1020 #if defined(ENABLE_CONFIGURATION_POLICY) |
1022 network_delegate->set_url_blacklist_manager(url_blacklist_manager_.get()); | 1021 network_delegate->set_url_blacklist_manager(url_blacklist_manager_.get()); |
1023 #endif | 1022 #endif |
1024 network_delegate->set_profile(profile_params_->profile); | 1023 network_delegate->set_profile(profile_params_->profile); |
1025 network_delegate->set_profile_path(profile_params_->path); | 1024 network_delegate->set_profile_path(profile_params_->path); |
1026 network_delegate->set_cookie_settings(profile_params_->cookie_settings.get()); | 1025 network_delegate->set_cookie_settings(profile_params_->cookie_settings.get()); |
1027 network_delegate->set_enable_do_not_track(&enable_do_not_track_); | 1026 network_delegate->set_enable_do_not_track(&enable_do_not_track_); |
1028 network_delegate->set_force_safe_search(&force_safesearch_); | |
1029 network_delegate->set_force_google_safe_search(&force_google_safesearch_); | 1027 network_delegate->set_force_google_safe_search(&force_google_safesearch_); |
1030 network_delegate->set_force_youtube_safety_mode(&force_youtube_safety_mode_); | 1028 network_delegate->set_force_youtube_safety_mode(&force_youtube_safety_mode_); |
1031 fraudulent_certificate_reporter_.reset( | 1029 fraudulent_certificate_reporter_.reset( |
1032 new chrome_browser_net::ChromeFraudulentCertificateReporter( | 1030 new chrome_browser_net::ChromeFraudulentCertificateReporter( |
1033 main_request_context_.get())); | 1031 main_request_context_.get())); |
1034 | 1032 |
1035 // NOTE: Proxy service uses the default io thread network delegate, not the | 1033 // NOTE: Proxy service uses the default io thread network delegate, not the |
1036 // delegate just created. | 1034 // delegate just created. |
1037 proxy_service_.reset( | 1035 proxy_service_.reset( |
1038 ProxyServiceFactory::CreateProxyService( | 1036 ProxyServiceFactory::CreateProxyService( |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1203 void ProfileIOData::ShutdownOnUIThread( | 1201 void ProfileIOData::ShutdownOnUIThread( |
1204 scoped_ptr<ChromeURLRequestContextGetterVector> context_getters) { | 1202 scoped_ptr<ChromeURLRequestContextGetterVector> context_getters) { |
1205 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1203 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
1206 | 1204 |
1207 if (signin_names_) | 1205 if (signin_names_) |
1208 signin_names_->ReleaseResourcesOnUIThread(); | 1206 signin_names_->ReleaseResourcesOnUIThread(); |
1209 | 1207 |
1210 google_services_user_account_id_.Destroy(); | 1208 google_services_user_account_id_.Destroy(); |
1211 enable_referrers_.Destroy(); | 1209 enable_referrers_.Destroy(); |
1212 enable_do_not_track_.Destroy(); | 1210 enable_do_not_track_.Destroy(); |
1213 force_safesearch_.Destroy(); | |
1214 force_google_safesearch_.Destroy(); | 1211 force_google_safesearch_.Destroy(); |
1215 force_youtube_safety_mode_.Destroy(); | 1212 force_youtube_safety_mode_.Destroy(); |
1216 #if !defined(OS_CHROMEOS) | 1213 #if !defined(OS_CHROMEOS) |
1217 enable_metrics_.Destroy(); | 1214 enable_metrics_.Destroy(); |
1218 #endif | 1215 #endif |
1219 safe_browsing_enabled_.Destroy(); | 1216 safe_browsing_enabled_.Destroy(); |
1220 sync_disabled_.Destroy(); | 1217 sync_disabled_.Destroy(); |
1221 signin_allowed_.Destroy(); | 1218 signin_allowed_.Destroy(); |
1222 network_prediction_options_.Destroy(); | 1219 network_prediction_options_.Destroy(); |
1223 quick_check_enabled_.Destroy(); | 1220 quick_check_enabled_.Destroy(); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1300 void ProfileIOData::SetCookieSettingsForTesting( | 1297 void ProfileIOData::SetCookieSettingsForTesting( |
1301 CookieSettings* cookie_settings) { | 1298 CookieSettings* cookie_settings) { |
1302 DCHECK(!cookie_settings_.get()); | 1299 DCHECK(!cookie_settings_.get()); |
1303 cookie_settings_ = cookie_settings; | 1300 cookie_settings_ = cookie_settings; |
1304 } | 1301 } |
1305 | 1302 |
1306 void ProfileIOData::set_signin_names_for_testing( | 1303 void ProfileIOData::set_signin_names_for_testing( |
1307 SigninNamesOnIOThread* signin_names) { | 1304 SigninNamesOnIOThread* signin_names) { |
1308 signin_names_.reset(signin_names); | 1305 signin_names_.reset(signin_names); |
1309 } | 1306 } |
OLD | NEW |