Chromium Code Reviews| Index: components/os_crypt/libsecret_util_posix.cc |
| diff --git a/components/os_crypt/libsecret_util_posix.cc b/components/os_crypt/libsecret_util_posix.cc |
| index 58ba9d0518aa4495a097fe4cba51de127d5a09ff..3e38899606a9e918703a204534a40972e30668c6 100644 |
| --- a/components/os_crypt/libsecret_util_posix.cc |
| +++ b/components/os_crypt/libsecret_util_posix.cc |
| @@ -5,10 +5,16 @@ |
| #include "components/os_crypt/libsecret_util_posix.h" |
| #include <dlfcn.h> |
| +#include <utility> |
|
vabr (Chromium)
2016/05/13 15:10:18
What is this used for?
cfroussios
2016/05/13 17:09:12
Done.
|
| +#include "base/base64.h" |
|
vabr (Chromium)
2016/05/13 15:10:18
And what is this used for?
cfroussios
2016/05/13 17:09:12
Done.
|
| #include "base/logging.h" |
| #include "base/strings/string_number_conversions.h" |
| +// |
| +// LibsecretLoader |
| +// |
| + |
| decltype( |
| &::secret_password_store_sync) LibsecretLoader::secret_password_store_sync; |
| decltype( |
| @@ -22,24 +28,29 @@ decltype( |
| decltype(&::secret_item_load_secret_sync) |
| LibsecretLoader::secret_item_load_secret_sync; |
| decltype(&::secret_value_unref) LibsecretLoader::secret_value_unref; |
| +decltype( |
| + &::secret_service_lookup_sync) LibsecretLoader::secret_service_lookup_sync; |
| bool LibsecretLoader::libsecret_loaded_ = false; |
| const LibsecretLoader::FunctionInfo LibsecretLoader::kFunctions[] = { |
| - {"secret_password_store_sync", |
| - reinterpret_cast<void**>(&secret_password_store_sync)}, |
| - {"secret_service_search_sync", |
| - reinterpret_cast<void**>(&secret_service_search_sync)}, |
| - {"secret_password_clear_sync", |
| - reinterpret_cast<void**>(&secret_password_clear_sync)}, |
| {"secret_item_get_secret", |
| reinterpret_cast<void**>(&secret_item_get_secret)}, |
| - {"secret_value_get_text", reinterpret_cast<void**>(&secret_value_get_text)}, |
| {"secret_item_get_attributes", |
| reinterpret_cast<void**>(&secret_item_get_attributes)}, |
| {"secret_item_load_secret_sync", |
| reinterpret_cast<void**>(&secret_item_load_secret_sync)}, |
| - {"secret_value_unref", reinterpret_cast<void**>(&secret_value_unref)}}; |
| + {"secret_password_clear_sync", |
| + reinterpret_cast<void**>(&secret_password_clear_sync)}, |
| + {"secret_password_store_sync", |
| + reinterpret_cast<void**>(&secret_password_store_sync)}, |
| + {"secret_service_lookup_sync", |
| + reinterpret_cast<void**>(&secret_service_lookup_sync)}, |
| + {"secret_service_search_sync", |
| + reinterpret_cast<void**>(&secret_service_search_sync)}, |
| + {"secret_value_get_text", reinterpret_cast<void**>(&secret_value_get_text)}, |
| + {"secret_value_unref", reinterpret_cast<void**>(&secret_value_unref)}, |
| +}; |
| // static |
| bool LibsecretLoader::EnsureLibsecretLoaded() { |
| @@ -107,6 +118,10 @@ bool LibsecretLoader::LibsecretIsAvailable() { |
| return success; |
| } |
| +// |
| +// LibsecretAttributesBuilder |
| +// |
| + |
| LibsecretAttributesBuilder::LibsecretAttributesBuilder() { |
| attrs_ = g_hash_table_new_full(g_str_hash, g_str_equal, |
| nullptr, // no deleter for keys |