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

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

Issue 2059513003: Add a policy for disabling the stripping of PAC URLs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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
« no previous file with comments | « chrome/browser/prefs/command_line_pref_store.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 ProfileIOData::ChromeURLRequestContextGetterVector::iterator iter; 378 ProfileIOData::ChromeURLRequestContextGetterVector::iterator iter;
379 for (auto& chrome_context_getter : *getters) 379 for (auto& chrome_context_getter : *getters)
380 chrome_context_getter->NotifyContextShuttingDown(); 380 chrome_context_getter->NotifyContextShuttingDown();
381 } 381 }
382 382
383 } // namespace 383 } // namespace
384 384
385 void ProfileIOData::InitializeOnUIThread(Profile* profile) { 385 void ProfileIOData::InitializeOnUIThread(Profile* profile) {
386 DCHECK_CURRENTLY_ON(BrowserThread::UI); 386 DCHECK_CURRENTLY_ON(BrowserThread::UI);
387 PrefService* pref_service = profile->GetPrefs(); 387 PrefService* pref_service = profile->GetPrefs();
388 PrefService* local_state_pref_service = g_browser_process->local_state();
389 388
390 std::unique_ptr<ProfileParams> params(new ProfileParams); 389 std::unique_ptr<ProfileParams> params(new ProfileParams);
391 params->path = profile->GetPath(); 390 params->path = profile->GetPath();
392 391
393 params->io_thread = g_browser_process->io_thread(); 392 params->io_thread = g_browser_process->io_thread();
394 393
395 params->cookie_settings = CookieSettingsFactory::GetForProfile(profile); 394 params->cookie_settings = CookieSettingsFactory::GetForProfile(profile);
396 params->host_content_settings_map = 395 params->host_content_settings_map =
397 HostContentSettingsMapFactory::GetForProfile(profile); 396 HostContentSettingsMapFactory::GetForProfile(profile);
398 params->ssl_config_service = profile->GetSSLConfigService(); 397 params->ssl_config_service = profile->GetSSLConfigService();
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 prefs::kGoogleServicesUserAccountId, pref_service); 489 prefs::kGoogleServicesUserAccountId, pref_service);
491 google_services_user_account_id_.MoveToThread(io_task_runner); 490 google_services_user_account_id_.MoveToThread(io_task_runner);
492 491
493 sync_disabled_.Init(sync_driver::prefs::kSyncManaged, pref_service); 492 sync_disabled_.Init(sync_driver::prefs::kSyncManaged, pref_service);
494 sync_disabled_.MoveToThread(io_task_runner); 493 sync_disabled_.MoveToThread(io_task_runner);
495 494
496 signin_allowed_.Init(prefs::kSigninAllowed, pref_service); 495 signin_allowed_.Init(prefs::kSigninAllowed, pref_service);
497 signin_allowed_.MoveToThread(io_task_runner); 496 signin_allowed_.MoveToThread(io_task_runner);
498 } 497 }
499 498
500 quick_check_enabled_.Init(prefs::kQuickCheckEnabled,
501 local_state_pref_service);
502 quick_check_enabled_.MoveToThread(io_task_runner);
503
504 media_device_id_salt_ = new MediaDeviceIDSalt(pref_service, IsOffTheRecord()); 499 media_device_id_salt_ = new MediaDeviceIDSalt(pref_service, IsOffTheRecord());
505 500
506 network_prediction_options_.Init(prefs::kNetworkPredictionOptions, 501 network_prediction_options_.Init(prefs::kNetworkPredictionOptions,
507 pref_service); 502 pref_service);
508 503
509 network_prediction_options_.MoveToThread(io_task_runner); 504 network_prediction_options_.MoveToThread(io_task_runner);
510 505
511 #if defined(OS_CHROMEOS) 506 #if defined(OS_CHROMEOS)
512 std::unique_ptr<policy::PolicyCertVerifier> verifier = 507 std::unique_ptr<policy::PolicyCertVerifier> verifier =
513 policy::PolicyCertServiceFactory::CreateForProfile(profile); 508 policy::PolicyCertServiceFactory::CreateForProfile(profile);
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 network_delegate->set_data_use_aggregator( 1049 network_delegate->set_data_use_aggregator(
1055 io_thread_globals->data_use_aggregator.get(), IsOffTheRecord()); 1050 io_thread_globals->data_use_aggregator.get(), IsOffTheRecord());
1056 1051
1057 // NOTE: Proxy service uses the default io thread network delegate, not the 1052 // NOTE: Proxy service uses the default io thread network delegate, not the
1058 // delegate just created. 1053 // delegate just created.
1059 proxy_service_ = ProxyServiceFactory::CreateProxyService( 1054 proxy_service_ = ProxyServiceFactory::CreateProxyService(
1060 io_thread->net_log(), 1055 io_thread->net_log(),
1061 io_thread_globals->proxy_script_fetcher_context.get(), 1056 io_thread_globals->proxy_script_fetcher_context.get(),
1062 io_thread_globals->system_network_delegate.get(), 1057 io_thread_globals->system_network_delegate.get(),
1063 std::move(profile_params_->proxy_config_service), command_line, 1058 std::move(profile_params_->proxy_config_service), command_line,
1064 quick_check_enabled_.GetValue()); 1059 io_thread->WpadQuickCheckEnabled(),
1060 io_thread->PacHttpsUrlStrippingEnabled());
1065 transport_security_state_.reset(new net::TransportSecurityState()); 1061 transport_security_state_.reset(new net::TransportSecurityState());
1066 base::SequencedWorkerPool* pool = BrowserThread::GetBlockingPool(); 1062 base::SequencedWorkerPool* pool = BrowserThread::GetBlockingPool();
1067 transport_security_persister_.reset( 1063 transport_security_persister_.reset(
1068 new net::TransportSecurityPersister( 1064 new net::TransportSecurityPersister(
1069 transport_security_state_.get(), 1065 transport_security_state_.get(),
1070 profile_params_->path, 1066 profile_params_->path,
1071 pool->GetSequencedTaskRunnerWithShutdownBehavior( 1067 pool->GetSequencedTaskRunnerWithShutdownBehavior(
1072 pool->GetSequenceToken(), 1068 pool->GetSequenceToken(),
1073 base::SequencedWorkerPool::BLOCK_SHUTDOWN), 1069 base::SequencedWorkerPool::BLOCK_SHUTDOWN),
1074 IsOffTheRecord())); 1070 IsOffTheRecord()));
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 google_services_user_account_id_.Destroy(); 1250 google_services_user_account_id_.Destroy();
1255 enable_referrers_.Destroy(); 1251 enable_referrers_.Destroy();
1256 enable_do_not_track_.Destroy(); 1252 enable_do_not_track_.Destroy();
1257 force_google_safesearch_.Destroy(); 1253 force_google_safesearch_.Destroy();
1258 force_youtube_safety_mode_.Destroy(); 1254 force_youtube_safety_mode_.Destroy();
1259 enable_metrics_.Destroy(); 1255 enable_metrics_.Destroy();
1260 safe_browsing_enabled_.Destroy(); 1256 safe_browsing_enabled_.Destroy();
1261 sync_disabled_.Destroy(); 1257 sync_disabled_.Destroy();
1262 signin_allowed_.Destroy(); 1258 signin_allowed_.Destroy();
1263 network_prediction_options_.Destroy(); 1259 network_prediction_options_.Destroy();
1264 quick_check_enabled_.Destroy();
1265 if (media_device_id_salt_.get()) 1260 if (media_device_id_salt_.get())
1266 media_device_id_salt_->ShutdownOnUIThread(); 1261 media_device_id_salt_->ShutdownOnUIThread();
1267 session_startup_pref_.Destroy(); 1262 session_startup_pref_.Destroy();
1268 if (url_blacklist_manager_) 1263 if (url_blacklist_manager_)
1269 url_blacklist_manager_->ShutdownOnUIThread(); 1264 url_blacklist_manager_->ShutdownOnUIThread();
1270 if (chrome_http_user_agent_settings_) 1265 if (chrome_http_user_agent_settings_)
1271 chrome_http_user_agent_settings_->CleanupOnUIThread(); 1266 chrome_http_user_agent_settings_->CleanupOnUIThread();
1272 incognito_availibility_pref_.Destroy(); 1267 incognito_availibility_pref_.Destroy();
1273 1268
1274 if (!context_getters->empty()) { 1269 if (!context_getters->empty()) {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
1332 base::WrapUnique(new DevToolsNetworkTransactionFactory( 1327 base::WrapUnique(new DevToolsNetworkTransactionFactory(
1333 network_controller_handle_.GetController(), shared_session)), 1328 network_controller_handle_.GetController(), shared_session)),
1334 std::move(backend), true /* set_up_quic_server_info */)); 1329 std::move(backend), true /* set_up_quic_server_info */));
1335 } 1330 }
1336 1331
1337 void ProfileIOData::SetCookieSettingsForTesting( 1332 void ProfileIOData::SetCookieSettingsForTesting(
1338 content_settings::CookieSettings* cookie_settings) { 1333 content_settings::CookieSettings* cookie_settings) {
1339 DCHECK(!cookie_settings_.get()); 1334 DCHECK(!cookie_settings_.get());
1340 cookie_settings_ = cookie_settings; 1335 cookie_settings_ = cookie_settings;
1341 } 1336 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/command_line_pref_store.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698