| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 121 |
| 122 #if defined(OS_CHROMEOS) | 122 #if defined(OS_CHROMEOS) |
| 123 #include "chrome/browser/chromeos/certificate_provider/certificate_provider.h" | 123 #include "chrome/browser/chromeos/certificate_provider/certificate_provider.h" |
| 124 #include "chrome/browser/chromeos/certificate_provider/certificate_provider_serv
ice.h" | 124 #include "chrome/browser/chromeos/certificate_provider/certificate_provider_serv
ice.h" |
| 125 #include "chrome/browser/chromeos/certificate_provider/certificate_provider_serv
ice_factory.h" | 125 #include "chrome/browser/chromeos/certificate_provider/certificate_provider_serv
ice_factory.h" |
| 126 #include "chrome/browser/chromeos/fileapi/external_file_protocol_handler.h" | 126 #include "chrome/browser/chromeos/fileapi/external_file_protocol_handler.h" |
| 127 #include "chrome/browser/chromeos/login/startup_utils.h" | 127 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 128 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" | 128 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" |
| 129 #include "chrome/browser/chromeos/net/client_cert_filter_chromeos.h" | 129 #include "chrome/browser/chromeos/net/client_cert_filter_chromeos.h" |
| 130 #include "chrome/browser/chromeos/net/client_cert_store_chromeos.h" | 130 #include "chrome/browser/chromeos/net/client_cert_store_chromeos.h" |
| 131 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | |
| 132 #include "chrome/browser/chromeos/policy/policy_cert_service.h" | 131 #include "chrome/browser/chromeos/policy/policy_cert_service.h" |
| 133 #include "chrome/browser/chromeos/policy/policy_cert_service_factory.h" | 132 #include "chrome/browser/chromeos/policy/policy_cert_service_factory.h" |
| 134 #include "chrome/browser/chromeos/policy/policy_cert_verifier.h" | 133 #include "chrome/browser/chromeos/policy/policy_cert_verifier.h" |
| 135 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 134 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 136 #include "chrome/browser/chromeos/settings/cros_settings.h" | 135 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 137 #include "chrome/browser/net/nss_context.h" | 136 #include "chrome/browser/net/nss_context.h" |
| 138 #include "chromeos/dbus/dbus_thread_manager.h" | 137 #include "chromeos/dbus/dbus_thread_manager.h" |
| 139 #include "chromeos/settings/cros_settings_names.h" | 138 #include "chromeos/settings/cros_settings_names.h" |
| 140 #include "chromeos/tpm/tpm_token_info_getter.h" | 139 #include "chromeos/tpm/tpm_token_info_getter.h" |
| 141 #include "components/user_manager/user.h" | 140 #include "components/user_manager/user.h" |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 if (user && !user->username_hash().empty()) { | 441 if (user && !user->username_hash().empty()) { |
| 443 params->username_hash = user->username_hash(); | 442 params->username_hash = user->username_hash(); |
| 444 DCHECK(!params->username_hash.empty()); | 443 DCHECK(!params->username_hash.empty()); |
| 445 BrowserThread::PostTask(BrowserThread::IO, | 444 BrowserThread::PostTask(BrowserThread::IO, |
| 446 FROM_HERE, | 445 FROM_HERE, |
| 447 base::Bind(&StartNSSInitOnIOThread, | 446 base::Bind(&StartNSSInitOnIOThread, |
| 448 user->email(), | 447 user->email(), |
| 449 user->username_hash(), | 448 user->username_hash(), |
| 450 profile->GetPath())); | 449 profile->GetPath())); |
| 451 | 450 |
| 452 // Use the device-wide system key slot only if the user is of the same | 451 // Use the device-wide system key slot only if the user is affiliated on |
| 453 // domain as the device is registered to. | 452 // the device. |
| 454 policy::BrowserPolicyConnectorChromeOS* connector = | 453 params->use_system_key_slot = user->is_affiliated(); |
| 455 g_browser_process->platform_part() | |
| 456 ->browser_policy_connector_chromeos(); | |
| 457 params->use_system_key_slot = | |
| 458 connector->GetUserAffiliation(user->email()) == | |
| 459 policy::USER_AFFILIATION_MANAGED; | |
| 460 } | 454 } |
| 461 } | 455 } |
| 462 | 456 |
| 463 chromeos::CertificateProviderService* cert_provider_service = | 457 chromeos::CertificateProviderService* cert_provider_service = |
| 464 chromeos::CertificateProviderServiceFactory::GetForBrowserContext( | 458 chromeos::CertificateProviderServiceFactory::GetForBrowserContext( |
| 465 profile); | 459 profile); |
| 466 if (cert_provider_service) { | 460 if (cert_provider_service) { |
| 467 params->certificate_provider = | 461 params->certificate_provider = |
| 468 cert_provider_service->CreateCertificateProvider(); | 462 cert_provider_service->CreateCertificateProvider(); |
| 469 } | 463 } |
| (...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1345 make_scoped_ptr(new DevToolsNetworkTransactionFactory( | 1339 make_scoped_ptr(new DevToolsNetworkTransactionFactory( |
| 1346 network_controller_handle_.GetController(), shared_session)), | 1340 network_controller_handle_.GetController(), shared_session)), |
| 1347 backend.Pass(), true /* set_up_quic_server_info */)); | 1341 backend.Pass(), true /* set_up_quic_server_info */)); |
| 1348 } | 1342 } |
| 1349 | 1343 |
| 1350 void ProfileIOData::SetCookieSettingsForTesting( | 1344 void ProfileIOData::SetCookieSettingsForTesting( |
| 1351 content_settings::CookieSettings* cookie_settings) { | 1345 content_settings::CookieSettings* cookie_settings) { |
| 1352 DCHECK(!cookie_settings_.get()); | 1346 DCHECK(!cookie_settings_.get()); |
| 1353 cookie_settings_ = cookie_settings; | 1347 cookie_settings_ = cookie_settings; |
| 1354 } | 1348 } |
| OLD | NEW |