| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 } | 471 } |
| 472 #endif | 472 #endif |
| 473 | 473 |
| 474 params->profile = profile; | 474 params->profile = profile; |
| 475 profile_params_ = std::move(params); | 475 profile_params_ = std::move(params); |
| 476 | 476 |
| 477 ChromeNetworkDelegate::InitializePrefsOnUIThread( | 477 ChromeNetworkDelegate::InitializePrefsOnUIThread( |
| 478 &enable_referrers_, | 478 &enable_referrers_, |
| 479 &enable_do_not_track_, | 479 &enable_do_not_track_, |
| 480 &force_google_safesearch_, | 480 &force_google_safesearch_, |
| 481 &force_youtube_safety_mode_, | 481 &force_youtube_restrict_, |
| 482 &allowed_domains_for_apps_, | 482 &allowed_domains_for_apps_, |
| 483 pref_service); | 483 pref_service); |
| 484 | 484 |
| 485 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = | 485 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = |
| 486 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); | 486 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); |
| 487 | 487 |
| 488 chrome_http_user_agent_settings_.reset( | 488 chrome_http_user_agent_settings_.reset( |
| 489 new ChromeHttpUserAgentSettings(pref_service)); | 489 new ChromeHttpUserAgentSettings(pref_service)); |
| 490 | 490 |
| 491 // These members are used only for sign in, which is not enabled | 491 // These members are used only for sign in, which is not enabled |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1052 new extensions::ExtensionThrottleManager()); | 1052 new extensions::ExtensionThrottleManager()); |
| 1053 } | 1053 } |
| 1054 #endif | 1054 #endif |
| 1055 | 1055 |
| 1056 network_delegate->set_url_blacklist_manager(url_blacklist_manager_.get()); | 1056 network_delegate->set_url_blacklist_manager(url_blacklist_manager_.get()); |
| 1057 network_delegate->set_profile(profile_params_->profile); | 1057 network_delegate->set_profile(profile_params_->profile); |
| 1058 network_delegate->set_profile_path(profile_params_->path); | 1058 network_delegate->set_profile_path(profile_params_->path); |
| 1059 network_delegate->set_cookie_settings(profile_params_->cookie_settings.get()); | 1059 network_delegate->set_cookie_settings(profile_params_->cookie_settings.get()); |
| 1060 network_delegate->set_enable_do_not_track(&enable_do_not_track_); | 1060 network_delegate->set_enable_do_not_track(&enable_do_not_track_); |
| 1061 network_delegate->set_force_google_safe_search(&force_google_safesearch_); | 1061 network_delegate->set_force_google_safe_search(&force_google_safesearch_); |
| 1062 network_delegate->set_force_youtube_safety_mode(&force_youtube_safety_mode_); | 1062 network_delegate->set_force_youtube_restrict(&force_youtube_restrict_); |
| 1063 network_delegate->set_allowed_domains_for_apps(&allowed_domains_for_apps_); | 1063 network_delegate->set_allowed_domains_for_apps(&allowed_domains_for_apps_); |
| 1064 network_delegate->set_data_use_aggregator( | 1064 network_delegate->set_data_use_aggregator( |
| 1065 io_thread_globals->data_use_aggregator.get(), IsOffTheRecord()); | 1065 io_thread_globals->data_use_aggregator.get(), IsOffTheRecord()); |
| 1066 | 1066 |
| 1067 // NOTE: Proxy service uses the default io thread network delegate, not the | 1067 // NOTE: Proxy service uses the default io thread network delegate, not the |
| 1068 // delegate just created. | 1068 // delegate just created. |
| 1069 proxy_service_ = ProxyServiceFactory::CreateProxyService( | 1069 proxy_service_ = ProxyServiceFactory::CreateProxyService( |
| 1070 io_thread->net_log(), | 1070 io_thread->net_log(), |
| 1071 io_thread_globals->proxy_script_fetcher_context.get(), | 1071 io_thread_globals->proxy_script_fetcher_context.get(), |
| 1072 io_thread_globals->system_network_delegate.get(), | 1072 io_thread_globals->system_network_delegate.get(), |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1270 } | 1270 } |
| 1271 | 1271 |
| 1272 void ProfileIOData::ShutdownOnUIThread( | 1272 void ProfileIOData::ShutdownOnUIThread( |
| 1273 std::unique_ptr<ChromeURLRequestContextGetterVector> context_getters) { | 1273 std::unique_ptr<ChromeURLRequestContextGetterVector> context_getters) { |
| 1274 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1274 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 1275 | 1275 |
| 1276 google_services_user_account_id_.Destroy(); | 1276 google_services_user_account_id_.Destroy(); |
| 1277 enable_referrers_.Destroy(); | 1277 enable_referrers_.Destroy(); |
| 1278 enable_do_not_track_.Destroy(); | 1278 enable_do_not_track_.Destroy(); |
| 1279 force_google_safesearch_.Destroy(); | 1279 force_google_safesearch_.Destroy(); |
| 1280 force_youtube_safety_mode_.Destroy(); | 1280 force_youtube_restrict_.Destroy(); |
| 1281 allowed_domains_for_apps_.Destroy(); | 1281 allowed_domains_for_apps_.Destroy(); |
| 1282 enable_metrics_.Destroy(); | 1282 enable_metrics_.Destroy(); |
| 1283 safe_browsing_enabled_.Destroy(); | 1283 safe_browsing_enabled_.Destroy(); |
| 1284 sync_disabled_.Destroy(); | 1284 sync_disabled_.Destroy(); |
| 1285 signin_allowed_.Destroy(); | 1285 signin_allowed_.Destroy(); |
| 1286 network_prediction_options_.Destroy(); | 1286 network_prediction_options_.Destroy(); |
| 1287 if (media_device_id_salt_.get()) | 1287 if (media_device_id_salt_.get()) |
| 1288 media_device_id_salt_->ShutdownOnUIThread(); | 1288 media_device_id_salt_->ShutdownOnUIThread(); |
| 1289 session_startup_pref_.Destroy(); | 1289 session_startup_pref_.Destroy(); |
| 1290 if (url_blacklist_manager_) | 1290 if (url_blacklist_manager_) |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1371 void ProfileIOData::SetCookieSettingsForTesting( | 1371 void ProfileIOData::SetCookieSettingsForTesting( |
| 1372 content_settings::CookieSettings* cookie_settings) { | 1372 content_settings::CookieSettings* cookie_settings) { |
| 1373 DCHECK(!cookie_settings_.get()); | 1373 DCHECK(!cookie_settings_.get()); |
| 1374 cookie_settings_ = cookie_settings; | 1374 cookie_settings_ = cookie_settings; |
| 1375 } | 1375 } |
| 1376 | 1376 |
| 1377 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( | 1377 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( |
| 1378 const GURL& url) const { | 1378 const GURL& url) const { |
| 1379 return url_blacklist_manager_->GetURLBlacklistState(url); | 1379 return url_blacklist_manager_->GetURLBlacklistState(url); |
| 1380 } | 1380 } |
| OLD | NEW |