Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(805)

Unified Diff: chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc

Issue 516243002: Instantiation of OwnerKeyUtil is delegated to OwnerSettingsServiceFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: BUILD.gn is fixed + style fixes. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc
diff --git a/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc b/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc
index 634cd41e4c485768ab4aa95b96cacd7c5da9f5d4..cff00d4cf170d353fa154b4b1c4f6b482316e90b 100644
--- a/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc
+++ b/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc
@@ -123,7 +123,9 @@ class CryptohomeAuthenticatorTest : public testing::Test {
user_manager_enabler_(user_manager_),
mock_caller_(NULL),
mock_homedir_methods_(NULL),
- owner_key_util_(new ownership::MockOwnerKeyUtil) {
+ owner_key_util_(new ownership::MockOwnerKeyUtil()) {
+ OwnerSettingsServiceFactory::GetInstance()->set_owner_key_util_for_testing(
+ owner_key_util_);
user_context_.SetKey(Key("fakepass"));
user_context_.SetUserIDHash("me_nowhere_com_hash");
const user_manager::User* user =
@@ -155,15 +157,12 @@ class CryptohomeAuthenticatorTest : public testing::Test {
SystemSaltGetter::Initialize();
- OwnerSettingsService::SetOwnerKeyUtilForTesting(owner_key_util_);
-
auth_ = new ChromeCryptohomeAuthenticator(&consumer_);
state_.reset(new TestAttemptState(user_context_, false));
}
// Tears down the test fixture.
virtual void TearDown() {
- OwnerSettingsService::SetOwnerKeyUtilForTesting(NULL);
SystemSaltGetter::Shutdown();
DBusThreadManager::Shutdown();

Powered by Google App Engine
This is Rietveld 408576698