Lines Matching refs:username_hash
496 bool InitializeNSSForChromeOSUser(const std::string& username_hash,
499 if (chromeos_user_map_.find(username_hash) != chromeos_user_map_.end()) {
501 DVLOG(2) << username_hash << " already initialized.";
507 "%s %s", kUserNSSDatabaseName, username_hash.c_str());
509 chromeos_user_map_[username_hash] =
514 bool ShouldInitializeTPMForChromeOSUser(const std::string& username_hash) {
516 DCHECK(chromeos_user_map_.find(username_hash) != chromeos_user_map_.end());
518 return !chromeos_user_map_[username_hash]
522 void WillInitializeTPMForChromeOSUser(const std::string& username_hash) {
524 DCHECK(chromeos_user_map_.find(username_hash) != chromeos_user_map_.end());
526 chromeos_user_map_[username_hash]
530 void InitializeTPMForChromeOSUser(const std::string& username_hash,
533 DCHECK(chromeos_user_map_.find(username_hash) != chromeos_user_map_.end());
534 DCHECK(chromeos_user_map_[username_hash]->
552 username_hash,
559 const std::string& username_hash,
562 DVLOG(2) << "Got tpm slot for " << username_hash << " "
564 chromeos_user_map_[username_hash]->SetPrivateSlot(
569 const std::string& username_hash) {
571 VLOG(1) << "using software private slot for " << username_hash;
572 DCHECK(chromeos_user_map_.find(username_hash) != chromeos_user_map_.end());
573 DCHECK(chromeos_user_map_[username_hash]->
576 chromeos_user_map_[username_hash]->SetPrivateSlot(
577 chromeos_user_map_[username_hash]->GetPublicSlot());
581 const std::string& username_hash) {
584 if (username_hash.empty()) {
585 DVLOG(2) << "empty username_hash";
589 if (chromeos_user_map_.find(username_hash) == chromeos_user_map_.end()) {
590 LOG(ERROR) << username_hash << " not initialized.";
593 return chromeos_user_map_[username_hash]->GetPublicSlot();
597 const std::string& username_hash,
601 if (username_hash.empty()) {
602 DVLOG(2) << "empty username_hash";
610 DCHECK(chromeos_user_map_.find(username_hash) != chromeos_user_map_.end());
612 return chromeos_user_map_[username_hash]->GetPrivateSlot(callback);
615 void CloseChromeOSUserForTesting(const std::string& username_hash) {
617 ChromeOSUserMap::iterator i = chromeos_user_map_.find(username_hash);
976 bool InitializeNSSForChromeOSUser(const std::string& username_hash,
978 return g_nss_singleton.Get().InitializeNSSForChromeOSUser(username_hash,
982 bool ShouldInitializeTPMForChromeOSUser(const std::string& username_hash) {
984 username_hash);
987 void WillInitializeTPMForChromeOSUser(const std::string& username_hash) {
988 g_nss_singleton.Get().WillInitializeTPMForChromeOSUser(username_hash);
992 const std::string& username_hash,
994 g_nss_singleton.Get().InitializeTPMForChromeOSUser(username_hash, slot_id);
998 const std::string& username_hash) {
1000 username_hash);
1003 ScopedPK11Slot GetPublicSlotForChromeOSUser(const std::string& username_hash) {
1004 return g_nss_singleton.Get().GetPublicSlotForChromeOSUser(username_hash);
1008 const std::string& username_hash,
1010 return g_nss_singleton.Get().GetPrivateSlotForChromeOSUser(username_hash,
1014 void CloseChromeOSUserForTesting(const std::string& username_hash) {
1015 g_nss_singleton.Get().CloseChromeOSUserForTesting(username_hash);