Index: chrome/browser/chromeos/login/quick_unlock/pin_storage_unittest.cc |
diff --git a/chrome/browser/chromeos/login/quick_unlock/pin_storage_unittest.cc b/chrome/browser/chromeos/login/quick_unlock/pin_storage_unittest.cc |
index 37ce31a3ffcb9f18835bba8db54bfdd1b337e5b3..04117f793a2d5e53789946fd16f6c65e95b66133 100644 |
--- a/chrome/browser/chromeos/login/quick_unlock/pin_storage_unittest.cc |
+++ b/chrome/browser/chromeos/login/quick_unlock/pin_storage_unittest.cc |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "chrome/browser/chromeos/login/quick_unlock/pin_storage.h" |
-#include "chrome/browser/chromeos/login/quick_unlock/pin_storage_factory.h" |
+#include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_factory.h" |
+#include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.h" |
#include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h" |
#include "chrome/common/pref_names.h" |
#include "chrome/test/base/testing_profile.h" |
@@ -75,7 +75,8 @@ TEST_F(PinStorageUnitTest, PinStorageWritesToPrefs) { |
EXPECT_EQ("", prefs->GetString(prefs::kQuickUnlockPinSecret)); |
quick_unlock::PinStorage* pin_storage = |
- quick_unlock::PinStorageFactory::GetForProfile(profile_.get()); |
+ quick_unlock::QuickUnlockFactory::GetForProfile(profile_.get()) |
+ ->pin_storage(); |
PinStorageTestApi pin_storage_test(pin_storage); |
pin_storage->SetPin("1111"); |
@@ -99,7 +100,8 @@ TEST_F(PinStorageUnitTest, PinStorageWritesToPrefs) { |
// 3. Resetting unlock attempt count correctly sets attempt count to 0. |
TEST_F(PinStorageUnitTest, UnlockAttemptCount) { |
quick_unlock::PinStorage* pin_storage = |
- quick_unlock::PinStorageFactory::GetForProfile(profile_.get()); |
+ quick_unlock::QuickUnlockFactory::GetForProfile(profile_.get()) |
+ ->pin_storage(); |
EXPECT_EQ(0, pin_storage->unlock_attempt_count()); |
@@ -116,7 +118,8 @@ TEST_F(PinStorageUnitTest, UnlockAttemptCount) { |
// value. |
TEST_F(PinStorageUnitTest, TimeSinceLastStrongAuthReturnsPositiveValue) { |
quick_unlock::PinStorage* pin_storage = |
- quick_unlock::PinStorageFactory::GetForProfile(profile_.get()); |
+ quick_unlock::QuickUnlockFactory::GetForProfile(profile_.get()) |
+ ->pin_storage(); |
PinStorageTestApi pin_storage_test(pin_storage); |
EXPECT_FALSE(pin_storage_test.HasStrongAuthInfo()); |
@@ -135,7 +138,8 @@ TEST_F(PinStorageUnitTest, TimeSinceLastStrongAuthReturnsPositiveValue) { |
// storage will request password reconfirmation as expected. |
TEST_F(PinStorageUnitTest, QuickUnlockPasswordConfirmationFrequencyPreference) { |
quick_unlock::PinStorage* pin_storage = |
- quick_unlock::PinStorageFactory::GetForProfile(profile_.get()); |
+ quick_unlock::QuickUnlockFactory::GetForProfile(profile_.get()) |
+ ->pin_storage(); |
PrefService* pref_service = profile_->GetPrefs(); |
PinStorageTestApi test_api(pin_storage); |
@@ -190,7 +194,8 @@ TEST_F(PinStorageUnitTest, QuickUnlockPasswordConfirmationFrequencyPreference) { |
// Verifies that the correct pin can be used to authenticate. |
TEST_F(PinStorageUnitTest, AuthenticationSucceedsWithRightPin) { |
quick_unlock::PinStorage* pin_storage = |
- quick_unlock::PinStorageFactory::GetForProfile(profile_.get()); |
+ quick_unlock::QuickUnlockFactory::GetForProfile(profile_.get()) |
+ ->pin_storage(); |
pin_storage->SetPin("1111"); |
@@ -202,7 +207,8 @@ TEST_F(PinStorageUnitTest, AuthenticationSucceedsWithRightPin) { |
// authentication attempts have been made. |
TEST_F(PinStorageUnitTest, AuthenticationFailsFromTooManyAttempts) { |
quick_unlock::PinStorage* pin_storage = |
- quick_unlock::PinStorageFactory::GetForProfile(profile_.get()); |
+ quick_unlock::QuickUnlockFactory::GetForProfile(profile_.get()) |
+ ->pin_storage(); |
pin_storage->SetPin("1111"); |
@@ -221,7 +227,8 @@ TEST_F(PinStorageUnitTest, AuthenticationFailsFromTooManyAttempts) { |
// long since a strong-auth/password authentication. |
TEST_F(PinStorageUnitTest, AuthenticationFailsFromTimeout) { |
quick_unlock::PinStorage* pin_storage = |
- quick_unlock::PinStorageFactory::GetForProfile(profile_.get()); |
+ quick_unlock::QuickUnlockFactory::GetForProfile(profile_.get()) |
+ ->pin_storage(); |
PinStorageTestApi pin_storage_test(pin_storage); |
pin_storage->SetPin("1111"); |