Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Side by Side Diff: chrome/browser/profiles/profile_io_data.cc

Issue 2239753002: Added a ForceYouTubeRestrict policy and deprecated the old ForceYouTubeSafetyMode policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 } 472 }
473 #endif 473 #endif
474 474
475 params->profile = profile; 475 params->profile = profile;
476 profile_params_ = std::move(params); 476 profile_params_ = std::move(params);
477 477
478 ChromeNetworkDelegate::InitializePrefsOnUIThread( 478 ChromeNetworkDelegate::InitializePrefsOnUIThread(
479 &enable_referrers_, 479 &enable_referrers_,
480 &enable_do_not_track_, 480 &enable_do_not_track_,
481 &force_google_safesearch_, 481 &force_google_safesearch_,
482 &force_youtube_safety_mode_, 482 &force_youtube_restrict_,
483 &allowed_domains_for_apps_, 483 &allowed_domains_for_apps_,
484 pref_service); 484 pref_service);
485 485
486 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = 486 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner =
487 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); 487 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO);
488 488
489 chrome_http_user_agent_settings_.reset( 489 chrome_http_user_agent_settings_.reset(
490 new ChromeHttpUserAgentSettings(pref_service)); 490 new ChromeHttpUserAgentSettings(pref_service));
491 491
492 // These members are used only for sign in, which is not enabled 492 // These members are used only for sign in, which is not enabled
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 new extensions::ExtensionThrottleManager()); 1058 new extensions::ExtensionThrottleManager());
1059 } 1059 }
1060 #endif 1060 #endif
1061 1061
1062 network_delegate->set_url_blacklist_manager(url_blacklist_manager_.get()); 1062 network_delegate->set_url_blacklist_manager(url_blacklist_manager_.get());
1063 network_delegate->set_profile(profile_params_->profile); 1063 network_delegate->set_profile(profile_params_->profile);
1064 network_delegate->set_profile_path(profile_params_->path); 1064 network_delegate->set_profile_path(profile_params_->path);
1065 network_delegate->set_cookie_settings(profile_params_->cookie_settings.get()); 1065 network_delegate->set_cookie_settings(profile_params_->cookie_settings.get());
1066 network_delegate->set_enable_do_not_track(&enable_do_not_track_); 1066 network_delegate->set_enable_do_not_track(&enable_do_not_track_);
1067 network_delegate->set_force_google_safe_search(&force_google_safesearch_); 1067 network_delegate->set_force_google_safe_search(&force_google_safesearch_);
1068 network_delegate->set_force_youtube_safety_mode(&force_youtube_safety_mode_); 1068 network_delegate->set_force_youtube_restrict(&force_youtube_restrict_);
1069 network_delegate->set_allowed_domains_for_apps(&allowed_domains_for_apps_); 1069 network_delegate->set_allowed_domains_for_apps(&allowed_domains_for_apps_);
1070 network_delegate->set_data_use_aggregator( 1070 network_delegate->set_data_use_aggregator(
1071 io_thread_globals->data_use_aggregator.get(), IsOffTheRecord()); 1071 io_thread_globals->data_use_aggregator.get(), IsOffTheRecord());
1072 1072
1073 // NOTE: Proxy service uses the default io thread network delegate, not the 1073 // NOTE: Proxy service uses the default io thread network delegate, not the
1074 // delegate just created. 1074 // delegate just created.
1075 proxy_service_ = ProxyServiceFactory::CreateProxyService( 1075 proxy_service_ = ProxyServiceFactory::CreateProxyService(
1076 io_thread->net_log(), 1076 io_thread->net_log(),
1077 io_thread_globals->proxy_script_fetcher_context.get(), 1077 io_thread_globals->proxy_script_fetcher_context.get(),
1078 io_thread_globals->system_network_delegate.get(), 1078 io_thread_globals->system_network_delegate.get(),
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1276 } 1276 }
1277 1277
1278 void ProfileIOData::ShutdownOnUIThread( 1278 void ProfileIOData::ShutdownOnUIThread(
1279 std::unique_ptr<ChromeURLRequestContextGetterVector> context_getters) { 1279 std::unique_ptr<ChromeURLRequestContextGetterVector> context_getters) {
1280 DCHECK_CURRENTLY_ON(BrowserThread::UI); 1280 DCHECK_CURRENTLY_ON(BrowserThread::UI);
1281 1281
1282 google_services_user_account_id_.Destroy(); 1282 google_services_user_account_id_.Destroy();
1283 enable_referrers_.Destroy(); 1283 enable_referrers_.Destroy();
1284 enable_do_not_track_.Destroy(); 1284 enable_do_not_track_.Destroy();
1285 force_google_safesearch_.Destroy(); 1285 force_google_safesearch_.Destroy();
1286 force_youtube_safety_mode_.Destroy(); 1286 force_youtube_restrict_.Destroy();
1287 allowed_domains_for_apps_.Destroy(); 1287 allowed_domains_for_apps_.Destroy();
1288 enable_metrics_.Destroy(); 1288 enable_metrics_.Destroy();
1289 safe_browsing_enabled_.Destroy(); 1289 safe_browsing_enabled_.Destroy();
1290 sync_disabled_.Destroy(); 1290 sync_disabled_.Destroy();
1291 signin_allowed_.Destroy(); 1291 signin_allowed_.Destroy();
1292 network_prediction_options_.Destroy(); 1292 network_prediction_options_.Destroy();
1293 if (media_device_id_salt_.get()) 1293 if (media_device_id_salt_.get())
1294 media_device_id_salt_->ShutdownOnUIThread(); 1294 media_device_id_salt_->ShutdownOnUIThread();
1295 session_startup_pref_.Destroy(); 1295 session_startup_pref_.Destroy();
1296 if (url_blacklist_manager_) 1296 if (url_blacklist_manager_)
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | chrome/browser/supervised_user/supervised_user_pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698