Commit fa32f2e5 authored by pneubeck's avatar pneubeck Committed by Commit bot

Remove unused user email argument from nss_util.

BUG=413219
(for trivial refactoring)
TBR=willchan@chromium.org,rsleevi@chromium.org,nkostylev@chromium.org

Review URL: https://codereview.chromium.org/560303002

Cr-Commit-Position: refs/heads/master@{#294570}
parent e84a1d22
...@@ -45,7 +45,6 @@ void ChromeCryptohomeAuthenticator::CheckSafeModeOwnership( ...@@ -45,7 +45,6 @@ void ChromeCryptohomeAuthenticator::CheckSafeModeOwnership(
} }
OwnerSettingsService::IsOwnerForSafeModeAsync( OwnerSettingsService::IsOwnerForSafeModeAsync(
context.GetUserID(),
context.GetUserIDHash(), context.GetUserIDHash(),
OwnerSettingsServiceFactory::GetInstance()->GetOwnerKeyUtil(), OwnerSettingsServiceFactory::GetInstance()->GetOwnerKeyUtil(),
callback); callback);
......
...@@ -377,7 +377,6 @@ void OwnerSettingsService::OwnerKeySet(bool success) { ...@@ -377,7 +377,6 @@ void OwnerSettingsService::OwnerKeySet(bool success) {
// static // static
void OwnerSettingsService::IsOwnerForSafeModeAsync( void OwnerSettingsService::IsOwnerForSafeModeAsync(
const std::string& user_id,
const std::string& user_hash, const std::string& user_hash,
const scoped_refptr<OwnerKeyUtil>& owner_key_util, const scoped_refptr<OwnerKeyUtil>& owner_key_util,
const IsOwnerCallback& callback) { const IsOwnerCallback& callback) {
...@@ -389,7 +388,6 @@ void OwnerSettingsService::IsOwnerForSafeModeAsync( ...@@ -389,7 +388,6 @@ void OwnerSettingsService::IsOwnerForSafeModeAsync(
BrowserThread::IO, BrowserThread::IO,
FROM_HERE, FROM_HERE,
base::Bind(base::IgnoreResult(&crypto::InitializeNSSForChromeOSUser), base::Bind(base::IgnoreResult(&crypto::InitializeNSSForChromeOSUser),
user_id,
user_hash, user_hash,
ProfileHelper::GetProfilePathByUserIdHash(user_hash)), ProfileHelper::GetProfilePathByUserIdHash(user_hash)),
base::Bind(&DoesPrivateKeyExistAsync, owner_key_util, callback)); base::Bind(&DoesPrivateKeyExistAsync, owner_key_util, callback));
......
...@@ -69,7 +69,6 @@ class OwnerSettingsService : public DeviceSettingsService::PrivateKeyDelegate, ...@@ -69,7 +69,6 @@ class OwnerSettingsService : public DeviceSettingsService::PrivateKeyDelegate,
// Checks if the user is the device owner, without the user profile having to // Checks if the user is the device owner, without the user profile having to
// been initialized. Should be used only if login state is in safe mode. // been initialized. Should be used only if login state is in safe mode.
static void IsOwnerForSafeModeAsync( static void IsOwnerForSafeModeAsync(
const std::string& user_id,
const std::string& user_hash, const std::string& user_hash,
const scoped_refptr<ownership::OwnerKeyUtil>& owner_key_util, const scoped_refptr<ownership::OwnerKeyUtil>& owner_key_util,
const IsOwnerCallback& callback); const IsOwnerCallback& callback);
......
...@@ -304,7 +304,7 @@ void StartNSSInitOnIOThread(const std::string& username, ...@@ -304,7 +304,7 @@ void StartNSSInitOnIOThread(const std::string& username,
<< " hash:" << username_hash; << " hash:" << username_hash;
// Make sure NSS is initialized for the user. // Make sure NSS is initialized for the user.
crypto::InitializeNSSForChromeOSUser(username, username_hash, path); crypto::InitializeNSSForChromeOSUser(username_hash, path);
// Check if it's OK to initialize TPM for the user before continuing. This // Check if it's OK to initialize TPM for the user before continuing. This
// may not be the case if the TPM slot initialization was previously // may not be the case if the TPM slot initialization was previously
......
...@@ -450,10 +450,8 @@ class NSSInitSingleton { ...@@ -450,10 +450,8 @@ class NSSInitSingleton {
return crypto::ScopedPK11Slot(slot); return crypto::ScopedPK11Slot(slot);
} }
bool InitializeNSSForChromeOSUser( bool InitializeNSSForChromeOSUser(const std::string& username_hash,
const std::string& email, const base::FilePath& path) {
const std::string& username_hash,
const base::FilePath& path) {
DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(thread_checker_.CalledOnValidThread());
if (chromeos_user_map_.find(username_hash) != chromeos_user_map_.end()) { if (chromeos_user_map_.find(username_hash) != chromeos_user_map_.end()) {
// This user already exists in our mapping. // This user already exists in our mapping.
...@@ -1045,12 +1043,10 @@ void InitializeTPMTokenAndSystemSlot( ...@@ -1045,12 +1043,10 @@ void InitializeTPMTokenAndSystemSlot(
callback); callback);
} }
bool InitializeNSSForChromeOSUser( bool InitializeNSSForChromeOSUser(const std::string& username_hash,
const std::string& email, const base::FilePath& path) {
const std::string& username_hash, return g_nss_singleton.Get().InitializeNSSForChromeOSUser(username_hash,
const base::FilePath& path) { path);
return g_nss_singleton.Get().InitializeNSSForChromeOSUser(
email, username_hash, path);
} }
bool ShouldInitializeTPMForChromeOSUser(const std::string& username_hash) { bool ShouldInitializeTPMForChromeOSUser(const std::string& username_hash) {
......
...@@ -64,7 +64,6 @@ CRYPTO_EXPORT_PRIVATE void SetSystemKeySlotForTesting(ScopedPK11Slot slot); ...@@ -64,7 +64,6 @@ CRYPTO_EXPORT_PRIVATE void SetSystemKeySlotForTesting(ScopedPK11Slot slot);
// Prepare per-user NSS slot mapping. It is safe to call this function multiple // Prepare per-user NSS slot mapping. It is safe to call this function multiple
// times. Returns true if the user was added, or false if it already existed. // times. Returns true if the user was added, or false if it already existed.
CRYPTO_EXPORT bool InitializeNSSForChromeOSUser( CRYPTO_EXPORT bool InitializeNSSForChromeOSUser(
const std::string& email,
const std::string& username_hash, const std::string& username_hash,
const base::FilePath& path); const base::FilePath& path);
......
...@@ -17,8 +17,8 @@ ScopedTestNSSChromeOSUser::ScopedTestNSSChromeOSUser( ...@@ -17,8 +17,8 @@ ScopedTestNSSChromeOSUser::ScopedTestNSSChromeOSUser(
return; return;
// This opens a software DB in the given folder. In production code that is in // This opens a software DB in the given folder. In production code that is in
// the home folder, but for testing the temp folder is used. // the home folder, but for testing the temp folder is used.
constructed_successfully_ = InitializeNSSForChromeOSUser( constructed_successfully_ =
username_hash, username_hash, temp_dir_.path()); InitializeNSSForChromeOSUser(username_hash, temp_dir_.path());
} }
ScopedTestNSSChromeOSUser::~ScopedTestNSSChromeOSUser() { ScopedTestNSSChromeOSUser::~ScopedTestNSSChromeOSUser() {
......
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