| 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 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 963 | 963 |
| 964 resource_context_->host_resolver_ = io_thread_globals->host_resolver.get(); | 964 resource_context_->host_resolver_ = io_thread_globals->host_resolver.get(); |
| 965 resource_context_->request_context_ = main_request_context_.get(); | 965 resource_context_->request_context_ = main_request_context_.get(); |
| 966 | 966 |
| 967 #if defined(ENABLE_MANAGED_USERS) | 967 #if defined(ENABLE_MANAGED_USERS) |
| 968 managed_mode_url_filter_ = profile_params_->managed_mode_url_filter; | 968 managed_mode_url_filter_ = profile_params_->managed_mode_url_filter; |
| 969 #endif | 969 #endif |
| 970 | 970 |
| 971 #if defined(OS_CHROMEOS) | 971 #if defined(OS_CHROMEOS) |
| 972 username_hash_ = profile_params_->username_hash; | 972 username_hash_ = profile_params_->username_hash; |
| 973 crypto::ScopedPK11Slot public_slot = | 973 scoped_refptr<net::CertVerifyProc> verify_proc; |
| 974 crypto::GetPublicSlotForChromeOSUser(username_hash_); | 974 if (chromeos::UserManager::IsMultipleProfilesAllowed()) { |
| 975 // The private slot won't be ready by this point. It shouldn't be necessary | 975 crypto::ScopedPK11Slot public_slot = |
| 976 // for cert trust purposes anyway. | 976 crypto::GetPublicSlotForChromeOSUser(username_hash_); |
| 977 scoped_refptr<net::CertVerifyProc> verify_proc = | 977 // The private slot won't be ready by this point. It shouldn't be necessary |
| 978 new chromeos::CertVerifyProcChromeOS(public_slot.Pass()); | 978 // for cert trust purposes anyway. |
| 979 verify_proc = new chromeos::CertVerifyProcChromeOS(public_slot.Pass()); |
| 980 } else { |
| 981 verify_proc = net::CertVerifyProc::CreateDefault(); |
| 982 } |
| 979 if (cert_verifier_) { | 983 if (cert_verifier_) { |
| 980 cert_verifier_->InitializeOnIOThread(verify_proc); | 984 cert_verifier_->InitializeOnIOThread(verify_proc); |
| 981 main_request_context_->set_cert_verifier(cert_verifier_.get()); | 985 main_request_context_->set_cert_verifier(cert_verifier_.get()); |
| 982 } else { | 986 } else { |
| 983 main_request_context_->set_cert_verifier( | 987 main_request_context_->set_cert_verifier( |
| 984 new net::MultiThreadedCertVerifier(verify_proc.get())); | 988 new net::MultiThreadedCertVerifier(verify_proc.get())); |
| 985 } | 989 } |
| 986 #else | 990 #else |
| 987 main_request_context_->set_cert_verifier( | 991 main_request_context_->set_cert_verifier( |
| 988 io_thread_globals->cert_verifier.get()); | 992 io_thread_globals->cert_verifier.get()); |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1139 void ProfileIOData::SetCookieSettingsForTesting( | 1143 void ProfileIOData::SetCookieSettingsForTesting( |
| 1140 CookieSettings* cookie_settings) { | 1144 CookieSettings* cookie_settings) { |
| 1141 DCHECK(!cookie_settings_.get()); | 1145 DCHECK(!cookie_settings_.get()); |
| 1142 cookie_settings_ = cookie_settings; | 1146 cookie_settings_ = cookie_settings; |
| 1143 } | 1147 } |
| 1144 | 1148 |
| 1145 void ProfileIOData::set_signin_names_for_testing( | 1149 void ProfileIOData::set_signin_names_for_testing( |
| 1146 SigninNamesOnIOThread* signin_names) { | 1150 SigninNamesOnIOThread* signin_names) { |
| 1147 signin_names_.reset(signin_names); | 1151 signin_names_.reset(signin_names); |
| 1148 } | 1152 } |
| OLD | NEW |