Chromium Code Reviews| Index: components/os_crypt/libsecret_loader.h |
| diff --git a/components/os_crypt/libsecret_loader.h b/components/os_crypt/libsecret_loader.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..bb0a28bde1e4eadfc16226de503d297fad12e74e |
| --- /dev/null |
| +++ b/components/os_crypt/libsecret_loader.h |
| @@ -0,0 +1,40 @@ |
| +// Copyright (c) 2016 The Chromium Authors. All rights reserved. |
|
vabr (Chromium)
2016/04/28 07:53:21
nit: No (c), see http://dev.chromium.org/developer
cfroussios
2016/04/28 12:18:11
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_OS_CRYPT_LIBSECRET_LOADER_H_ |
| +#define COMPONENTS_OS_CRYPT_LIBSECRET_LOADER_H_ |
| + |
| +#include <libsecret/secret.h> |
| + |
| +#include <string> |
| + |
| +#include "base/macros.h" |
| + |
| +class LibsecretLoader { |
| + public: |
| + static decltype(&::secret_password_store_sync) secret_password_store_sync; |
| + static decltype(&::secret_service_search_sync) secret_service_search_sync; |
| + static decltype(&::secret_password_clear_sync) secret_password_clear_sync; |
| + static decltype(&::secret_item_get_secret) secret_item_get_secret; |
| + static decltype(&::secret_value_get_text) secret_value_get_text; |
| + static decltype(&::secret_item_get_attributes) secret_item_get_attributes; |
| + static decltype(&::secret_item_load_secret_sync) secret_item_load_secret_sync; |
| + static decltype(&::secret_value_unref) secret_value_unref; |
| + |
| + protected: |
| + static bool LoadLibsecret(); |
| + static bool LibsecretIsAvailable(); |
| + |
| + static bool libsecret_loaded; |
| + |
| + private: |
| + struct FunctionInfo { |
| + const char* name; |
| + void** pointer; |
| + }; |
| + |
| + static const FunctionInfo functions[]; |
| +}; |
|
vabr (Chromium)
2016/04/28 07:53:21
Please add
DISALLOW_IMPLICIT_CONSTRUCTORS(Libsecre
cfroussios
2016/04/28 12:18:11
NativeBackendLibsecret inherits from LibsecretLoad
vabr (Chromium)
2016/04/28 12:44:25
It does not really make sense to derive from a sta
vabr (Chromium)
2016/04/28 14:42:12
Ping.
cfroussios
2016/04/28 16:26:57
The libsecret field needs to stay protected, so th
cfroussios
2016/04/28 16:26:57
Done.
vabr (Chromium)
2016/04/29 07:36:45
Acknowledged.
|
| + |
| +#endif // COMPONENTS_OS_CRYPT_LIBSECRET_LOADER_H_ |