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

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: Created 4 years, 4 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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 } 470 }
471 #endif 471 #endif
472 472
473 params->profile = profile; 473 params->profile = profile;
474 profile_params_.reset(params.release()); 474 profile_params_.reset(params.release());
475 475
476 ChromeNetworkDelegate::InitializePrefsOnUIThread( 476 ChromeNetworkDelegate::InitializePrefsOnUIThread(
477 &enable_referrers_, 477 &enable_referrers_,
478 &enable_do_not_track_, 478 &enable_do_not_track_,
479 &force_google_safesearch_, 479 &force_google_safesearch_,
480 &force_youtube_safety_mode_, 480 &force_youtube_restrict_,
481 &allowed_domains_for_apps_, 481 &allowed_domains_for_apps_,
482 pref_service); 482 pref_service);
483 483
484 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = 484 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner =
485 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); 485 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO);
486 486
487 chrome_http_user_agent_settings_.reset( 487 chrome_http_user_agent_settings_.reset(
488 new ChromeHttpUserAgentSettings(pref_service)); 488 new ChromeHttpUserAgentSettings(pref_service));
489 489
490 // These members are used only for sign in, which is not enabled 490 // These members are used only for sign in, which is not enabled
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 new extensions::ExtensionThrottleManager()); 1060 new extensions::ExtensionThrottleManager());
1061 } 1061 }
1062 #endif 1062 #endif
1063 1063
1064 network_delegate->set_url_blacklist_manager(url_blacklist_manager_.get()); 1064 network_delegate->set_url_blacklist_manager(url_blacklist_manager_.get());
1065 network_delegate->set_profile(profile_params_->profile); 1065 network_delegate->set_profile(profile_params_->profile);
1066 network_delegate->set_profile_path(profile_params_->path); 1066 network_delegate->set_profile_path(profile_params_->path);
1067 network_delegate->set_cookie_settings(profile_params_->cookie_settings.get()); 1067 network_delegate->set_cookie_settings(profile_params_->cookie_settings.get());
1068 network_delegate->set_enable_do_not_track(&enable_do_not_track_); 1068 network_delegate->set_enable_do_not_track(&enable_do_not_track_);
1069 network_delegate->set_force_google_safe_search(&force_google_safesearch_); 1069 network_delegate->set_force_google_safe_search(&force_google_safesearch_);
1070 network_delegate->set_force_youtube_safety_mode(&force_youtube_safety_mode_); 1070 network_delegate->set_force_youtube_restrict(&force_youtube_restrict_);
1071 network_delegate->set_allowed_domains_for_apps(&allowed_domains_for_apps_); 1071 network_delegate->set_allowed_domains_for_apps(&allowed_domains_for_apps_);
1072 network_delegate->set_data_use_aggregator( 1072 network_delegate->set_data_use_aggregator(
1073 io_thread_globals->data_use_aggregator.get(), IsOffTheRecord()); 1073 io_thread_globals->data_use_aggregator.get(), IsOffTheRecord());
1074 1074
1075 // NOTE: Proxy service uses the default io thread network delegate, not the 1075 // NOTE: Proxy service uses the default io thread network delegate, not the
1076 // delegate just created. 1076 // delegate just created.
1077 proxy_service_ = ProxyServiceFactory::CreateProxyService( 1077 proxy_service_ = ProxyServiceFactory::CreateProxyService(
1078 io_thread->net_log(), 1078 io_thread->net_log(),
1079 io_thread_globals->proxy_script_fetcher_context.get(), 1079 io_thread_globals->proxy_script_fetcher_context.get(),
1080 io_thread_globals->system_network_delegate.get(), 1080 io_thread_globals->system_network_delegate.get(),
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 } 1278 }
1279 1279
1280 void ProfileIOData::ShutdownOnUIThread( 1280 void ProfileIOData::ShutdownOnUIThread(
1281 std::unique_ptr<ChromeURLRequestContextGetterVector> context_getters) { 1281 std::unique_ptr<ChromeURLRequestContextGetterVector> context_getters) {
1282 DCHECK_CURRENTLY_ON(BrowserThread::UI); 1282 DCHECK_CURRENTLY_ON(BrowserThread::UI);
1283 1283
1284 google_services_user_account_id_.Destroy(); 1284 google_services_user_account_id_.Destroy();
1285 enable_referrers_.Destroy(); 1285 enable_referrers_.Destroy();
1286 enable_do_not_track_.Destroy(); 1286 enable_do_not_track_.Destroy();
1287 force_google_safesearch_.Destroy(); 1287 force_google_safesearch_.Destroy();
1288 force_youtube_safety_mode_.Destroy(); 1288 force_youtube_restrict_.Destroy();
1289 allowed_domains_for_apps_.Destroy(); 1289 allowed_domains_for_apps_.Destroy();
1290 enable_metrics_.Destroy(); 1290 enable_metrics_.Destroy();
1291 safe_browsing_enabled_.Destroy(); 1291 safe_browsing_enabled_.Destroy();
1292 sync_disabled_.Destroy(); 1292 sync_disabled_.Destroy();
1293 signin_allowed_.Destroy(); 1293 signin_allowed_.Destroy();
1294 network_prediction_options_.Destroy(); 1294 network_prediction_options_.Destroy();
1295 if (media_device_id_salt_.get()) 1295 if (media_device_id_salt_.get())
1296 media_device_id_salt_->ShutdownOnUIThread(); 1296 media_device_id_salt_->ShutdownOnUIThread();
1297 session_startup_pref_.Destroy(); 1297 session_startup_pref_.Destroy();
1298 if (url_blacklist_manager_) 1298 if (url_blacklist_manager_)
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 void ProfileIOData::SetCookieSettingsForTesting( 1375 void ProfileIOData::SetCookieSettingsForTesting(
1376 content_settings::CookieSettings* cookie_settings) { 1376 content_settings::CookieSettings* cookie_settings) {
1377 DCHECK(!cookie_settings_.get()); 1377 DCHECK(!cookie_settings_.get());
1378 cookie_settings_ = cookie_settings; 1378 cookie_settings_ = cookie_settings;
1379 } 1379 }
1380 1380
1381 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( 1381 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState(
1382 const GURL& url) const { 1382 const GURL& url) const {
1383 return url_blacklist_manager_->GetURLBlacklistState(url); 1383 return url_blacklist_manager_->GetURLBlacklistState(url);
1384 } 1384 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698