Commit 55b87b91 authored by David Benjamin's avatar David Benjamin Committed by Commit Bot

Remove dead code.

user_manager is never actually used, except to check if it's there.
UserManager::Get(), in turn, fails a CHECK if there is no UserManager.

Bug: none
Change-Id: I6e3adfc1b5143447f90e2f3cd04ff1e6af5d64b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1846078
Auto-Submit: David Benjamin <davidben@chromium.org>
Reviewed-by: default avatarMihai Sardarescu <msarda@chromium.org>
Commit-Queue: David Benjamin <davidben@chromium.org>
Cr-Commit-Position: refs/heads/master@{#703754}
parent 3e138a8e
...@@ -267,19 +267,16 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) { ...@@ -267,19 +267,16 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) {
params->system_key_slot_use_type = SystemKeySlotUseType::kUseForClientAuth; params->system_key_slot_use_type = SystemKeySlotUseType::kUseForClientAuth;
} }
user_manager::UserManager* user_manager = user_manager::UserManager::Get();
if (user_manager) {
const user_manager::User* user = const user_manager::User* user =
chromeos::ProfileHelper::Get()->GetUserByProfile(profile); chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
// No need to initialize NSS for users with empty username hash: // No need to initialize NSS for users with empty username hash:
// Getters for a user's NSS slots always return NULL slot if the user's // Getters for a user's NSS slots always return a null slot if the user's
// username hash is empty, even when the NSS is not initialized for the // username hash is empty, even when the NSS is not initialized for the
// user. // user.
if (user && !user->username_hash().empty()) { if (user && !user->username_hash().empty()) {
params->username_hash = user->username_hash(); params->username_hash = user->username_hash();
DCHECK(!params->username_hash.empty()); DCHECK(!params->username_hash.empty());
base::PostTask( base::PostTask(FROM_HERE, {BrowserThread::IO},
FROM_HERE, {BrowserThread::IO},
base::BindOnce(&StartNSSInitOnIOThread, user->GetAccountId(), base::BindOnce(&StartNSSInitOnIOThread, user->GetAccountId(),
user->username_hash(), profile->GetPath())); user->username_hash(), profile->GetPath()));
...@@ -290,7 +287,6 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) { ...@@ -290,7 +287,6 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) {
SystemKeySlotUseType::kUseForClientAuthAndCertManagement; SystemKeySlotUseType::kUseForClientAuthAndCertManagement;
} }
} }
}
chromeos::CertificateProviderService* cert_provider_service = chromeos::CertificateProviderService* cert_provider_service =
chromeos::CertificateProviderServiceFactory::GetForBrowserContext( chromeos::CertificateProviderServiceFactory::GetForBrowserContext(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment