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

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

Issue 2401743003: Recommit and fix of "Added a ForceYouTubeRestrict policy and deprecated the old ForceYouTubeSafetyM… (Closed)
Patch Set: Rebase 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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 new extensions::ExtensionThrottleManager()); 1047 new extensions::ExtensionThrottleManager());
1048 } 1048 }
1049 #endif 1049 #endif
1050 1050
1051 network_delegate->set_url_blacklist_manager(url_blacklist_manager_.get()); 1051 network_delegate->set_url_blacklist_manager(url_blacklist_manager_.get());
1052 network_delegate->set_profile(profile_params_->profile); 1052 network_delegate->set_profile(profile_params_->profile);
1053 network_delegate->set_profile_path(profile_params_->path); 1053 network_delegate->set_profile_path(profile_params_->path);
1054 network_delegate->set_cookie_settings(profile_params_->cookie_settings.get()); 1054 network_delegate->set_cookie_settings(profile_params_->cookie_settings.get());
1055 network_delegate->set_enable_do_not_track(&enable_do_not_track_); 1055 network_delegate->set_enable_do_not_track(&enable_do_not_track_);
1056 network_delegate->set_force_google_safe_search(&force_google_safesearch_); 1056 network_delegate->set_force_google_safe_search(&force_google_safesearch_);
1057 network_delegate->set_force_youtube_safety_mode(&force_youtube_safety_mode_); 1057 network_delegate->set_force_youtube_restrict(&force_youtube_restrict_);
1058 network_delegate->set_allowed_domains_for_apps(&allowed_domains_for_apps_); 1058 network_delegate->set_allowed_domains_for_apps(&allowed_domains_for_apps_);
1059 network_delegate->set_data_use_aggregator( 1059 network_delegate->set_data_use_aggregator(
1060 io_thread_globals->data_use_aggregator.get(), IsOffTheRecord()); 1060 io_thread_globals->data_use_aggregator.get(), IsOffTheRecord());
1061 1061
1062 // NOTE: Proxy service uses the default io thread network delegate, not the 1062 // NOTE: Proxy service uses the default io thread network delegate, not the
1063 // delegate just created. 1063 // delegate just created.
1064 proxy_service_ = ProxyServiceFactory::CreateProxyService( 1064 proxy_service_ = ProxyServiceFactory::CreateProxyService(
1065 io_thread->net_log(), 1065 io_thread->net_log(),
1066 io_thread_globals->proxy_script_fetcher_context.get(), 1066 io_thread_globals->proxy_script_fetcher_context.get(),
1067 io_thread_globals->system_network_delegate.get(), 1067 io_thread_globals->system_network_delegate.get(),
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 } 1265 }
1266 1266
1267 void ProfileIOData::ShutdownOnUIThread( 1267 void ProfileIOData::ShutdownOnUIThread(
1268 std::unique_ptr<ChromeURLRequestContextGetterVector> context_getters) { 1268 std::unique_ptr<ChromeURLRequestContextGetterVector> context_getters) {
1269 DCHECK_CURRENTLY_ON(BrowserThread::UI); 1269 DCHECK_CURRENTLY_ON(BrowserThread::UI);
1270 1270
1271 google_services_user_account_id_.Destroy(); 1271 google_services_user_account_id_.Destroy();
1272 enable_referrers_.Destroy(); 1272 enable_referrers_.Destroy();
1273 enable_do_not_track_.Destroy(); 1273 enable_do_not_track_.Destroy();
1274 force_google_safesearch_.Destroy(); 1274 force_google_safesearch_.Destroy();
1275 force_youtube_safety_mode_.Destroy(); 1275 force_youtube_restrict_.Destroy();
1276 allowed_domains_for_apps_.Destroy(); 1276 allowed_domains_for_apps_.Destroy();
1277 enable_metrics_.Destroy(); 1277 enable_metrics_.Destroy();
1278 safe_browsing_enabled_.Destroy(); 1278 safe_browsing_enabled_.Destroy();
1279 sync_disabled_.Destroy(); 1279 sync_disabled_.Destroy();
1280 signin_allowed_.Destroy(); 1280 signin_allowed_.Destroy();
1281 network_prediction_options_.Destroy(); 1281 network_prediction_options_.Destroy();
1282 if (media_device_id_salt_.get()) 1282 if (media_device_id_salt_.get())
1283 media_device_id_salt_->ShutdownOnUIThread(); 1283 media_device_id_salt_->ShutdownOnUIThread();
1284 session_startup_pref_.Destroy(); 1284 session_startup_pref_.Destroy();
1285 if (url_blacklist_manager_) 1285 if (url_blacklist_manager_)
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
1366 void ProfileIOData::SetCookieSettingsForTesting( 1366 void ProfileIOData::SetCookieSettingsForTesting(
1367 content_settings::CookieSettings* cookie_settings) { 1367 content_settings::CookieSettings* cookie_settings) {
1368 DCHECK(!cookie_settings_.get()); 1368 DCHECK(!cookie_settings_.get());
1369 cookie_settings_ = cookie_settings; 1369 cookie_settings_ = cookie_settings;
1370 } 1370 }
1371 1371
1372 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( 1372 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState(
1373 const GURL& url) const { 1373 const GURL& url) const {
1374 return url_blacklist_manager_->GetURLBlacklistState(url); 1374 return url_blacklist_manager_->GetURLBlacklistState(url);
1375 } 1375 }
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