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

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: Upped id to 347 and chrome version to 55 Created 4 years, 3 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_.reset(params.release()); 476 profile_params_.reset(params.release());
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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 new extensions::ExtensionThrottleManager()); 1068 new extensions::ExtensionThrottleManager());
1069 } 1069 }
1070 #endif 1070 #endif
1071 1071
1072 network_delegate->set_url_blacklist_manager(url_blacklist_manager_.get()); 1072 network_delegate->set_url_blacklist_manager(url_blacklist_manager_.get());
1073 network_delegate->set_profile(profile_params_->profile); 1073 network_delegate->set_profile(profile_params_->profile);
1074 network_delegate->set_profile_path(profile_params_->path); 1074 network_delegate->set_profile_path(profile_params_->path);
1075 network_delegate->set_cookie_settings(profile_params_->cookie_settings.get()); 1075 network_delegate->set_cookie_settings(profile_params_->cookie_settings.get());
1076 network_delegate->set_enable_do_not_track(&enable_do_not_track_); 1076 network_delegate->set_enable_do_not_track(&enable_do_not_track_);
1077 network_delegate->set_force_google_safe_search(&force_google_safesearch_); 1077 network_delegate->set_force_google_safe_search(&force_google_safesearch_);
1078 network_delegate->set_force_youtube_safety_mode(&force_youtube_safety_mode_); 1078 network_delegate->set_force_youtube_restrict(&force_youtube_restrict_);
1079 network_delegate->set_allowed_domains_for_apps(&allowed_domains_for_apps_); 1079 network_delegate->set_allowed_domains_for_apps(&allowed_domains_for_apps_);
1080 network_delegate->set_data_use_aggregator( 1080 network_delegate->set_data_use_aggregator(
1081 io_thread_globals->data_use_aggregator.get(), IsOffTheRecord()); 1081 io_thread_globals->data_use_aggregator.get(), IsOffTheRecord());
1082 1082
1083 // NOTE: Proxy service uses the default io thread network delegate, not the 1083 // NOTE: Proxy service uses the default io thread network delegate, not the
1084 // delegate just created. 1084 // delegate just created.
1085 proxy_service_ = ProxyServiceFactory::CreateProxyService( 1085 proxy_service_ = ProxyServiceFactory::CreateProxyService(
1086 io_thread->net_log(), 1086 io_thread->net_log(),
1087 io_thread_globals->proxy_script_fetcher_context.get(), 1087 io_thread_globals->proxy_script_fetcher_context.get(),
1088 io_thread_globals->system_network_delegate.get(), 1088 io_thread_globals->system_network_delegate.get(),
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1286 } 1286 }
1287 1287
1288 void ProfileIOData::ShutdownOnUIThread( 1288 void ProfileIOData::ShutdownOnUIThread(
1289 std::unique_ptr<ChromeURLRequestContextGetterVector> context_getters) { 1289 std::unique_ptr<ChromeURLRequestContextGetterVector> context_getters) {
1290 DCHECK_CURRENTLY_ON(BrowserThread::UI); 1290 DCHECK_CURRENTLY_ON(BrowserThread::UI);
1291 1291
1292 google_services_user_account_id_.Destroy(); 1292 google_services_user_account_id_.Destroy();
1293 enable_referrers_.Destroy(); 1293 enable_referrers_.Destroy();
1294 enable_do_not_track_.Destroy(); 1294 enable_do_not_track_.Destroy();
1295 force_google_safesearch_.Destroy(); 1295 force_google_safesearch_.Destroy();
1296 force_youtube_safety_mode_.Destroy(); 1296 force_youtube_restrict_.Destroy();
1297 allowed_domains_for_apps_.Destroy(); 1297 allowed_domains_for_apps_.Destroy();
1298 enable_metrics_.Destroy(); 1298 enable_metrics_.Destroy();
1299 safe_browsing_enabled_.Destroy(); 1299 safe_browsing_enabled_.Destroy();
1300 sync_disabled_.Destroy(); 1300 sync_disabled_.Destroy();
1301 signin_allowed_.Destroy(); 1301 signin_allowed_.Destroy();
1302 network_prediction_options_.Destroy(); 1302 network_prediction_options_.Destroy();
1303 if (media_device_id_salt_.get()) 1303 if (media_device_id_salt_.get())
1304 media_device_id_salt_->ShutdownOnUIThread(); 1304 media_device_id_salt_->ShutdownOnUIThread();
1305 session_startup_pref_.Destroy(); 1305 session_startup_pref_.Destroy();
1306 if (url_blacklist_manager_) 1306 if (url_blacklist_manager_)
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
1383 void ProfileIOData::SetCookieSettingsForTesting( 1383 void ProfileIOData::SetCookieSettingsForTesting(
1384 content_settings::CookieSettings* cookie_settings) { 1384 content_settings::CookieSettings* cookie_settings) {
1385 DCHECK(!cookie_settings_.get()); 1385 DCHECK(!cookie_settings_.get());
1386 cookie_settings_ = cookie_settings; 1386 cookie_settings_ = cookie_settings;
1387 } 1387 }
1388 1388
1389 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( 1389 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState(
1390 const GURL& url) const { 1390 const GURL& url) const {
1391 return url_blacklist_manager_->GetURLBlacklistState(url); 1391 return url_blacklist_manager_->GetURLBlacklistState(url);
1392 } 1392 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698