Index: components/os_crypt/os_crypt.h |
diff --git a/components/os_crypt/os_crypt.h b/components/os_crypt/os_crypt.h |
index ecffa4e5ed4c8c81b4acde3b8169b156eb305f51..8024392bcd02013b1873c09d5bd196a2e653ce85 100644 |
--- a/components/os_crypt/os_crypt.h |
+++ b/components/os_crypt/os_crypt.h |
@@ -10,6 +10,10 @@ |
#include "base/macros.h" |
#include "base/strings/string16.h" |
#include "build/build_config.h" |
+#if defined(USE_LIBSECRET) |
Lei Zhang
2016/05/18 22:38:16
Add a blank line separator
cfroussios
2016/05/19 21:18:18
Done.
|
+#include "components/os_crypt/key_storage_linux.h" |
+#include "components/os_crypt/key_storage_mock.h" |
+#endif |
// The OSCrypt class gives access to simple encryption and decryption of |
// strings. Note that on Mac, access to the system Keychain is required and |
@@ -43,6 +47,13 @@ class OSCrypt { |
static void UseMockKeychain(bool use_mock); |
#endif |
+#if defined(USE_LIBSECRET) |
+ // For unit testing purposes, use a mocked |KeyStorage| service. |
Lei Zhang
2016/05/18 22:38:16
Refer to variables as |var_name|, not classes.
cfroussios
2016/05/19 21:18:18
Acknowledged.
|
+ // A reference is to the |KeyStorageMock| is returned, so that the test can |
+ // manipulate the service. |
+ static KeyStorageMock* UseMockKeyStorage(bool use_mock); |
Lei Zhang
2016/05/18 22:38:16
This sounds confusing. What does UseMock...(use_mo
cfroussios
2016/05/19 21:18:18
I changed it so that a pointer is no longer return
|
+#endif |
+ |
private: |
DISALLOW_IMPLICIT_CONSTRUCTORS(OSCrypt); |
}; |