Index: components/autofill/core/browser/autofill_test_utils.cc |
diff --git a/components/autofill/core/browser/autofill_test_utils.cc b/components/autofill/core/browser/autofill_test_utils.cc |
index c16387533b8a4f3efdd0dde41fb70314a077af15..527e758903ab99399a66f9ad67259a7286c5f1f7 100644 |
--- a/components/autofill/core/browser/autofill_test_utils.cc |
+++ b/components/autofill/core/browser/autofill_test_utils.cc |
@@ -19,7 +19,6 @@ |
#include "components/encryptor/os_crypt.h" |
#include "components/user_prefs/pref_registry_syncable.h" |
#include "components/user_prefs/user_prefs.h" |
-#include "content/public/browser/browser_context.h" |
using base::ASCIIToUTF16; |
@@ -204,7 +203,7 @@ void SetCreditCardInfo(CreditCard* credit_card, |
check_and_set(credit_card, CREDIT_CARD_EXP_4_DIGIT_YEAR, expiration_year); |
} |
-void DisableSystemServices(content::BrowserContext* browser_context) { |
+void DisableSystemServices(PrefService* prefs) { |
// Use a mock Keychain rather than the OS one to store credit card data. |
#if defined(OS_MACOSX) |
OSCrypt::UseMockKeychain(true); |
@@ -212,10 +211,8 @@ void DisableSystemServices(content::BrowserContext* browser_context) { |
// Disable auxiliary profiles for unit testing. These reach out to system |
// services on the Mac. |
- if (browser_context) { |
- user_prefs::UserPrefs::Get(browser_context)->SetBoolean( |
- prefs::kAutofillAuxiliaryProfilesEnabled, false); |
- } |
+ if (prefs) |
+ prefs->SetBoolean(prefs::kAutofillAuxiliaryProfilesEnabled, false); |
} |
} // namespace test |