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

Unified Diff: components/os_crypt/os_crypt.h

Issue 2104943002: Fix guard for UseMockKeyStorageForTesting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/os_crypt/os_crypt.h
diff --git a/components/os_crypt/os_crypt.h b/components/os_crypt/os_crypt.h
index 12d47390915d8d0c536bc1ebaaa9d7b6cf5fd86e..a9bbdb1a6a295260f5671039ed41af00e00f786c 100644
--- a/components/os_crypt/os_crypt.h
+++ b/components/os_crypt/os_crypt.h
@@ -52,7 +52,7 @@ class OSCrypt {
DISALLOW_IMPLICIT_CONSTRUCTORS(OSCrypt);
};
-#if defined(USE_LIBSECRET) && defined(UNIT_TEST)
+#if (defined(USE_LIBSECRET) || defined(USE_KWALLET)) && defined(UNIT_TEST)
// For unit testing purposes, inject methods to be used.
// |get_key_storage_mock| provides the desired |KeyStorage| implementation.
// If the provider returns |nullptr|, a hardcoded password will be used.
@@ -60,6 +60,7 @@ class OSCrypt {
// If both parameters are |nullptr|, the real implementation is restored.
void UseMockKeyStorageForTesting(KeyStorageLinux* (*get_key_storage_mock)(),
std::string* (*get_password_v11_mock)());
-#endif // defined(USE_LIBSECRET) && defined(UNIT_TEST)
+#endif // (defined(USE_LIBSECRET) || defined(USE_KWALLET)) &&
+ // defined(UNIT_TEST)
#endif // COMPONENTS_OS_CRYPT_OS_CRYPT_H_
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698