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_.reset(params.release()); | 475 profile_params_.reset(params.release()); |
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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1062 new extensions::ExtensionThrottleManager()); | 1062 new extensions::ExtensionThrottleManager()); |
1063 } | 1063 } |
1064 #endif | 1064 #endif |
1065 | 1065 |
1066 network_delegate->set_url_blacklist_manager(url_blacklist_manager_.get()); | 1066 network_delegate->set_url_blacklist_manager(url_blacklist_manager_.get()); |
1067 network_delegate->set_profile(profile_params_->profile); | 1067 network_delegate->set_profile(profile_params_->profile); |
1068 network_delegate->set_profile_path(profile_params_->path); | 1068 network_delegate->set_profile_path(profile_params_->path); |
1069 network_delegate->set_cookie_settings(profile_params_->cookie_settings.get()); | 1069 network_delegate->set_cookie_settings(profile_params_->cookie_settings.get()); |
1070 network_delegate->set_enable_do_not_track(&enable_do_not_track_); | 1070 network_delegate->set_enable_do_not_track(&enable_do_not_track_); |
1071 network_delegate->set_force_google_safe_search(&force_google_safesearch_); | 1071 network_delegate->set_force_google_safe_search(&force_google_safesearch_); |
1072 network_delegate->set_force_youtube_safety_mode(&force_youtube_safety_mode_); | 1072 network_delegate->set_force_youtube_restrict(&force_youtube_restrict_); |
1073 network_delegate->set_allowed_domains_for_apps(&allowed_domains_for_apps_); | 1073 network_delegate->set_allowed_domains_for_apps(&allowed_domains_for_apps_); |
1074 network_delegate->set_data_use_aggregator( | 1074 network_delegate->set_data_use_aggregator( |
1075 io_thread_globals->data_use_aggregator.get(), IsOffTheRecord()); | 1075 io_thread_globals->data_use_aggregator.get(), IsOffTheRecord()); |
1076 | 1076 |
1077 // NOTE: Proxy service uses the default io thread network delegate, not the | 1077 // NOTE: Proxy service uses the default io thread network delegate, not the |
1078 // delegate just created. | 1078 // delegate just created. |
1079 proxy_service_ = ProxyServiceFactory::CreateProxyService( | 1079 proxy_service_ = ProxyServiceFactory::CreateProxyService( |
1080 io_thread->net_log(), | 1080 io_thread->net_log(), |
1081 io_thread_globals->proxy_script_fetcher_context.get(), | 1081 io_thread_globals->proxy_script_fetcher_context.get(), |
1082 io_thread_globals->system_network_delegate.get(), | 1082 io_thread_globals->system_network_delegate.get(), |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1280 } | 1280 } |
1281 | 1281 |
1282 void ProfileIOData::ShutdownOnUIThread( | 1282 void ProfileIOData::ShutdownOnUIThread( |
1283 std::unique_ptr<ChromeURLRequestContextGetterVector> context_getters) { | 1283 std::unique_ptr<ChromeURLRequestContextGetterVector> context_getters) { |
1284 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1284 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
1285 | 1285 |
1286 google_services_user_account_id_.Destroy(); | 1286 google_services_user_account_id_.Destroy(); |
1287 enable_referrers_.Destroy(); | 1287 enable_referrers_.Destroy(); |
1288 enable_do_not_track_.Destroy(); | 1288 enable_do_not_track_.Destroy(); |
1289 force_google_safesearch_.Destroy(); | 1289 force_google_safesearch_.Destroy(); |
1290 force_youtube_safety_mode_.Destroy(); | 1290 force_youtube_restrict_.Destroy(); |
1291 allowed_domains_for_apps_.Destroy(); | 1291 allowed_domains_for_apps_.Destroy(); |
1292 enable_metrics_.Destroy(); | 1292 enable_metrics_.Destroy(); |
1293 safe_browsing_enabled_.Destroy(); | 1293 safe_browsing_enabled_.Destroy(); |
1294 sync_disabled_.Destroy(); | 1294 sync_disabled_.Destroy(); |
1295 signin_allowed_.Destroy(); | 1295 signin_allowed_.Destroy(); |
1296 network_prediction_options_.Destroy(); | 1296 network_prediction_options_.Destroy(); |
1297 if (media_device_id_salt_.get()) | 1297 if (media_device_id_salt_.get()) |
1298 media_device_id_salt_->ShutdownOnUIThread(); | 1298 media_device_id_salt_->ShutdownOnUIThread(); |
1299 session_startup_pref_.Destroy(); | 1299 session_startup_pref_.Destroy(); |
1300 if (url_blacklist_manager_) | 1300 if (url_blacklist_manager_) |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1377 void ProfileIOData::SetCookieSettingsForTesting( | 1377 void ProfileIOData::SetCookieSettingsForTesting( |
1378 content_settings::CookieSettings* cookie_settings) { | 1378 content_settings::CookieSettings* cookie_settings) { |
1379 DCHECK(!cookie_settings_.get()); | 1379 DCHECK(!cookie_settings_.get()); |
1380 cookie_settings_ = cookie_settings; | 1380 cookie_settings_ = cookie_settings; |
1381 } | 1381 } |
1382 | 1382 |
1383 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( | 1383 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( |
1384 const GURL& url) const { | 1384 const GURL& url) const { |
1385 return url_blacklist_manager_->GetURLBlacklistState(url); | 1385 return url_blacklist_manager_->GetURLBlacklistState(url); |
1386 } | 1386 } |
OLD | NEW |