OLD | NEW |
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 <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 signin_allowed_.Init(prefs::kSigninAllowed, pref_service); | 425 signin_allowed_.Init(prefs::kSigninAllowed, pref_service); |
426 signin_allowed_.MoveToThread(io_message_loop_proxy); | 426 signin_allowed_.MoveToThread(io_message_loop_proxy); |
427 } | 427 } |
428 | 428 |
429 quick_check_enabled_.Init(prefs::kQuickCheckEnabled, | 429 quick_check_enabled_.Init(prefs::kQuickCheckEnabled, |
430 local_state_pref_service); | 430 local_state_pref_service); |
431 quick_check_enabled_.MoveToThread(io_message_loop_proxy); | 431 quick_check_enabled_.MoveToThread(io_message_loop_proxy); |
432 | 432 |
433 media_device_id_salt_ = new MediaDeviceIDSalt(pref_service, IsOffTheRecord()); | 433 media_device_id_salt_ = new MediaDeviceIDSalt(pref_service, IsOffTheRecord()); |
434 | 434 |
| 435 // TODO(bnc): remove per https://crbug.com/334602. |
435 network_prediction_enabled_.Init(prefs::kNetworkPredictionEnabled, | 436 network_prediction_enabled_.Init(prefs::kNetworkPredictionEnabled, |
436 pref_service); | 437 pref_service); |
437 network_prediction_enabled_.MoveToThread(io_message_loop_proxy); | 438 network_prediction_enabled_.MoveToThread(io_message_loop_proxy); |
438 | 439 |
| 440 allow_network_prediction_.Init(prefs::kAllowNetworkPrediction, pref_service); |
| 441 allow_network_prediction_.MoveToThread(io_message_loop_proxy); |
| 442 |
439 #if defined(OS_CHROMEOS) | 443 #if defined(OS_CHROMEOS) |
440 cert_verifier_ = policy::PolicyCertServiceFactory::CreateForProfile(profile); | 444 cert_verifier_ = policy::PolicyCertServiceFactory::CreateForProfile(profile); |
441 #endif | 445 #endif |
442 // The URLBlacklistManager has to be created on the UI thread to register | 446 // The URLBlacklistManager has to be created on the UI thread to register |
443 // observers of |pref_service|, and it also has to clean up on | 447 // observers of |pref_service|, and it also has to clean up on |
444 // ShutdownOnUIThread to release these observers on the right thread. | 448 // ShutdownOnUIThread to release these observers on the right thread. |
445 // Don't pass it in |profile_params_| to make sure it is correctly cleaned up, | 449 // Don't pass it in |profile_params_| to make sure it is correctly cleaned up, |
446 // in particular when this ProfileIOData isn't |initialized_| during deletion. | 450 // in particular when this ProfileIOData isn't |initialized_| during deletion. |
447 #if defined(ENABLE_CONFIGURATION_POLICY) | 451 #if defined(ENABLE_CONFIGURATION_POLICY) |
448 policy::URLBlacklist::SegmentURLCallback callback = | 452 policy::URLBlacklist::SegmentURLCallback callback = |
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1160 enable_do_not_track_.Destroy(); | 1164 enable_do_not_track_.Destroy(); |
1161 force_safesearch_.Destroy(); | 1165 force_safesearch_.Destroy(); |
1162 #if !defined(OS_CHROMEOS) | 1166 #if !defined(OS_CHROMEOS) |
1163 enable_metrics_.Destroy(); | 1167 enable_metrics_.Destroy(); |
1164 #endif | 1168 #endif |
1165 safe_browsing_enabled_.Destroy(); | 1169 safe_browsing_enabled_.Destroy(); |
1166 data_reduction_proxy_enabled_.Destroy(); | 1170 data_reduction_proxy_enabled_.Destroy(); |
1167 printing_enabled_.Destroy(); | 1171 printing_enabled_.Destroy(); |
1168 sync_disabled_.Destroy(); | 1172 sync_disabled_.Destroy(); |
1169 signin_allowed_.Destroy(); | 1173 signin_allowed_.Destroy(); |
| 1174 // TODO(bnc): remove per https://crbug.com/334602. |
1170 network_prediction_enabled_.Destroy(); | 1175 network_prediction_enabled_.Destroy(); |
| 1176 allow_network_prediction_.Destroy(); |
1171 quick_check_enabled_.Destroy(); | 1177 quick_check_enabled_.Destroy(); |
1172 if (media_device_id_salt_) | 1178 if (media_device_id_salt_) |
1173 media_device_id_salt_->ShutdownOnUIThread(); | 1179 media_device_id_salt_->ShutdownOnUIThread(); |
1174 session_startup_pref_.Destroy(); | 1180 session_startup_pref_.Destroy(); |
1175 #if defined(ENABLE_CONFIGURATION_POLICY) | 1181 #if defined(ENABLE_CONFIGURATION_POLICY) |
1176 if (url_blacklist_manager_) | 1182 if (url_blacklist_manager_) |
1177 url_blacklist_manager_->ShutdownOnUIThread(); | 1183 url_blacklist_manager_->ShutdownOnUIThread(); |
1178 #endif | 1184 #endif |
1179 if (chrome_http_user_agent_settings_) | 1185 if (chrome_http_user_agent_settings_) |
1180 chrome_http_user_agent_settings_->CleanupOnUIThread(); | 1186 chrome_http_user_agent_settings_->CleanupOnUIThread(); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1236 void ProfileIOData::SetCookieSettingsForTesting( | 1242 void ProfileIOData::SetCookieSettingsForTesting( |
1237 CookieSettings* cookie_settings) { | 1243 CookieSettings* cookie_settings) { |
1238 DCHECK(!cookie_settings_.get()); | 1244 DCHECK(!cookie_settings_.get()); |
1239 cookie_settings_ = cookie_settings; | 1245 cookie_settings_ = cookie_settings; |
1240 } | 1246 } |
1241 | 1247 |
1242 void ProfileIOData::set_signin_names_for_testing( | 1248 void ProfileIOData::set_signin_names_for_testing( |
1243 SigninNamesOnIOThread* signin_names) { | 1249 SigninNamesOnIOThread* signin_names) { |
1244 signin_names_.reset(signin_names); | 1250 signin_names_.reset(signin_names); |
1245 } | 1251 } |
OLD | NEW |