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

Unified Diff: components/os_crypt/os_crypt_mocker.cc

Issue 1973483002: OSCrypt for POSIX uses libsecret to store a randomised encryption key. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Recommendations 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
« no previous file with comments | « components/os_crypt/os_crypt_linux_unittest.cc ('k') | components/os_crypt/os_crypt_mocker_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/os_crypt/os_crypt_mocker.cc
diff --git a/components/os_crypt/os_crypt_mocker.cc b/components/os_crypt/os_crypt_mocker.cc
index 415773a89b09b84c269d6ee12445df4c14cf24e4..dd160cbaf5396d2fbe0c36c3c4c4381b78c24f6e 100644
--- a/components/os_crypt/os_crypt_mocker.cc
+++ b/components/os_crypt/os_crypt_mocker.cc
@@ -6,10 +6,16 @@
#include "components/os_crypt/os_crypt.h"
+#if defined(USE_LIBSECRET)
+#include "components/os_crypt/os_crypt_mocker_linux.h"
+#endif
+
// static
void OSCryptMocker::SetUpWithSingleton() {
#if defined(OS_MACOSX)
OSCrypt::UseMockKeychain(true);
+#elif defined(USE_LIBSECRET)
+ OSCryptMockerLinux::SetUpWithSingleton();
#endif
}
@@ -17,5 +23,7 @@ void OSCryptMocker::SetUpWithSingleton() {
void OSCryptMocker::TearDown() {
#if defined(OS_MACOSX)
OSCrypt::UseMockKeychain(false);
+#elif defined(USE_LIBSECRET)
+ OSCryptMockerLinux::TearDown();
#endif
}
« no previous file with comments | « components/os_crypt/os_crypt_linux_unittest.cc ('k') | components/os_crypt/os_crypt_mocker_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698