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

Unified Diff: components/autofill/core/browser/autofill_test_utils.cc

Issue 2010463002: Mocker for OSCrypt (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated doc Created 4 years, 7 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: 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 459481ac731bb9d04d2327c8bd60e0079627f95e..a5a89f6065e6e02878d1b41edfbd7de85f176da0 100644
--- a/components/autofill/core/browser/autofill_test_utils.cc
+++ b/components/autofill/core/browser/autofill_test_utils.cc
@@ -18,7 +18,7 @@
#include "components/autofill/core/common/autofill_pref_names.h"
#include "components/autofill/core/common/form_data.h"
#include "components/autofill/core/common/form_field_data.h"
-#include "components/os_crypt/os_crypt.h"
+#include "components/os_crypt/os_crypt_mocker.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/pref_service_factory.h"
@@ -310,9 +310,11 @@ void SetCreditCardInfo(CreditCard* credit_card,
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);
-#endif // defined(OS_MACOSX)
+ OSCryptMocker::SetUpWithSingleton();
+}
+
+void ReenableSystemServices() {
+ OSCryptMocker::TearDown();
}
void SetServerCreditCards(AutofillTable* table,

Powered by Google App Engine
This is Rietveld 408576698