| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 #include "components/dom_distiller/core/url_constants.h" | 67 #include "components/dom_distiller/core/url_constants.h" |
| 68 #include "components/metrics/metrics_pref_names.h" | 68 #include "components/metrics/metrics_pref_names.h" |
| 69 #include "components/metrics/metrics_service.h" | 69 #include "components/metrics/metrics_service.h" |
| 70 #include "components/net_log/chrome_net_log.h" | 70 #include "components/net_log/chrome_net_log.h" |
| 71 #include "components/policy/core/browser/url_blacklist_manager.h" | 71 #include "components/policy/core/browser/url_blacklist_manager.h" |
| 72 #include "components/policy/core/common/cloud/policy_header_io_helper.h" | 72 #include "components/policy/core/common/cloud/policy_header_io_helper.h" |
| 73 #include "components/policy/core/common/cloud/policy_header_service.h" | 73 #include "components/policy/core/common/cloud/policy_header_service.h" |
| 74 #include "components/policy/core/common/cloud/user_cloud_policy_manager.h" | 74 #include "components/policy/core/common/cloud/user_cloud_policy_manager.h" |
| 75 #include "components/prefs/pref_service.h" | 75 #include "components/prefs/pref_service.h" |
| 76 #include "components/signin/core/common/signin_pref_names.h" | 76 #include "components/signin/core/common/signin_pref_names.h" |
| 77 #include "components/sync/base/pref_names.h" | |
| 78 #include "components/url_formatter/url_fixer.h" | 77 #include "components/url_formatter/url_fixer.h" |
| 79 #include "content/public/browser/browser_thread.h" | 78 #include "content/public/browser/browser_thread.h" |
| 80 #include "content/public/browser/host_zoom_map.h" | 79 #include "content/public/browser/host_zoom_map.h" |
| 81 #include "content/public/browser/notification_service.h" | 80 #include "content/public/browser/notification_service.h" |
| 82 #include "content/public/browser/resource_context.h" | 81 #include "content/public/browser/resource_context.h" |
| 83 #include "content/public/common/content_switches.h" | 82 #include "content/public/common/content_switches.h" |
| 84 #include "extensions/features/features.h" | 83 #include "extensions/features/features.h" |
| 85 #include "net/cert/cert_verifier.h" | 84 #include "net/cert/cert_verifier.h" |
| 86 #include "net/cert/ct_log_verifier.h" | 85 #include "net/cert/ct_log_verifier.h" |
| 87 #include "net/cert/multi_log_ct_verifier.h" | 86 #include "net/cert/multi_log_ct_verifier.h" |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 | 474 |
| 476 chrome_http_user_agent_settings_.reset( | 475 chrome_http_user_agent_settings_.reset( |
| 477 new ChromeHttpUserAgentSettings(pref_service)); | 476 new ChromeHttpUserAgentSettings(pref_service)); |
| 478 | 477 |
| 479 // These members are used only for sign in, which is not enabled | 478 // These members are used only for sign in, which is not enabled |
| 480 // in incognito mode. So no need to initialize them. | 479 // in incognito mode. So no need to initialize them. |
| 481 if (!IsOffTheRecord()) { | 480 if (!IsOffTheRecord()) { |
| 482 google_services_user_account_id_.Init( | 481 google_services_user_account_id_.Init( |
| 483 prefs::kGoogleServicesUserAccountId, pref_service); | 482 prefs::kGoogleServicesUserAccountId, pref_service); |
| 484 google_services_user_account_id_.MoveToThread(io_task_runner); | 483 google_services_user_account_id_.MoveToThread(io_task_runner); |
| 485 | |
| 486 sync_disabled_.Init(syncer::prefs::kSyncManaged, pref_service); | |
| 487 sync_disabled_.MoveToThread(io_task_runner); | |
| 488 | |
| 489 signin_allowed_.Init(prefs::kSigninAllowed, pref_service); | |
| 490 signin_allowed_.MoveToThread(io_task_runner); | |
| 491 } | 484 } |
| 492 | 485 |
| 493 if (!IsOffTheRecord()) | 486 if (!IsOffTheRecord()) |
| 494 media_device_id_salt_ = new MediaDeviceIDSalt(pref_service); | 487 media_device_id_salt_ = new MediaDeviceIDSalt(pref_service); |
| 495 | 488 |
| 496 network_prediction_options_.Init(prefs::kNetworkPredictionOptions, | 489 network_prediction_options_.Init(prefs::kNetworkPredictionOptions, |
| 497 pref_service); | 490 pref_service); |
| 498 | 491 |
| 499 network_prediction_options_.MoveToThread(io_task_runner); | 492 network_prediction_options_.MoveToThread(io_task_runner); |
| 500 | 493 |
| (...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1216 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1209 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 1217 | 1210 |
| 1218 google_services_user_account_id_.Destroy(); | 1211 google_services_user_account_id_.Destroy(); |
| 1219 enable_referrers_.Destroy(); | 1212 enable_referrers_.Destroy(); |
| 1220 enable_do_not_track_.Destroy(); | 1213 enable_do_not_track_.Destroy(); |
| 1221 force_google_safesearch_.Destroy(); | 1214 force_google_safesearch_.Destroy(); |
| 1222 force_youtube_restrict_.Destroy(); | 1215 force_youtube_restrict_.Destroy(); |
| 1223 allowed_domains_for_apps_.Destroy(); | 1216 allowed_domains_for_apps_.Destroy(); |
| 1224 enable_metrics_.Destroy(); | 1217 enable_metrics_.Destroy(); |
| 1225 safe_browsing_enabled_.Destroy(); | 1218 safe_browsing_enabled_.Destroy(); |
| 1226 sync_disabled_.Destroy(); | |
| 1227 signin_allowed_.Destroy(); | |
| 1228 network_prediction_options_.Destroy(); | 1219 network_prediction_options_.Destroy(); |
| 1229 if (media_device_id_salt_.get()) | 1220 if (media_device_id_salt_.get()) |
| 1230 media_device_id_salt_->ShutdownOnUIThread(); | 1221 media_device_id_salt_->ShutdownOnUIThread(); |
| 1231 session_startup_pref_.Destroy(); | |
| 1232 if (url_blacklist_manager_) | 1222 if (url_blacklist_manager_) |
| 1233 url_blacklist_manager_->ShutdownOnUIThread(); | 1223 url_blacklist_manager_->ShutdownOnUIThread(); |
| 1234 if (ct_policy_manager_) | 1224 if (ct_policy_manager_) |
| 1235 ct_policy_manager_->Shutdown(); | 1225 ct_policy_manager_->Shutdown(); |
| 1236 if (chrome_http_user_agent_settings_) | 1226 if (chrome_http_user_agent_settings_) |
| 1237 chrome_http_user_agent_settings_->CleanupOnUIThread(); | 1227 chrome_http_user_agent_settings_->CleanupOnUIThread(); |
| 1238 incognito_availibility_pref_.Destroy(); | 1228 incognito_availibility_pref_.Destroy(); |
| 1239 | 1229 |
| 1240 if (!context_getters->empty()) { | 1230 if (!context_getters->empty()) { |
| 1241 if (BrowserThread::IsMessageLoopValid(BrowserThread::IO)) { | 1231 if (BrowserThread::IsMessageLoopValid(BrowserThread::IO)) { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1308 void ProfileIOData::SetCookieSettingsForTesting( | 1298 void ProfileIOData::SetCookieSettingsForTesting( |
| 1309 content_settings::CookieSettings* cookie_settings) { | 1299 content_settings::CookieSettings* cookie_settings) { |
| 1310 DCHECK(!cookie_settings_.get()); | 1300 DCHECK(!cookie_settings_.get()); |
| 1311 cookie_settings_ = cookie_settings; | 1301 cookie_settings_ = cookie_settings; |
| 1312 } | 1302 } |
| 1313 | 1303 |
| 1314 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( | 1304 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( |
| 1315 const GURL& url) const { | 1305 const GURL& url) const { |
| 1316 return url_blacklist_manager_->GetURLBlacklistState(url); | 1306 return url_blacklist_manager_->GetURLBlacklistState(url); |
| 1317 } | 1307 } |
| OLD | NEW |