OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef COMPONENTS_OS_CRYPT_LIBSECRET_LOADER_H_ | |
6 #define COMPONENTS_OS_CRYPT_LIBSECRET_LOADER_H_ | |
7 | |
8 #include <libsecret/secret.h> | |
9 | |
10 #include <string> | |
11 | |
12 #include "base/macros.h" | |
13 | |
14 class LibsecretLoader { | |
15 public: | |
16 static decltype(&::secret_password_store_sync) secret_password_store_sync; | |
17 static decltype(&::secret_service_search_sync) secret_service_search_sync; | |
18 static decltype(&::secret_password_clear_sync) secret_password_clear_sync; | |
19 static decltype(&::secret_item_get_secret) secret_item_get_secret; | |
20 static decltype(&::secret_value_get_text) secret_value_get_text; | |
21 static decltype(&::secret_item_get_attributes) secret_item_get_attributes; | |
22 static decltype(&::secret_item_load_secret_sync) secret_item_load_secret_sync; | |
23 static decltype(&::secret_value_unref) secret_value_unref; | |
24 | |
25 protected: | |
26 LibsecretLoader() = default; | |
27 | |
28 static bool LoadLibsecret(); | |
29 static bool LibsecretIsAvailable(); | |
30 | |
31 static bool libsecret_loaded; | |
32 | |
33 private: | |
34 DISALLOW_COPY_AND_ASSIGN(LibsecretLoader); | |
vabr (Chromium)
2016/04/28 12:44:25
nit: This still needs to be at the very end of the
cfroussios
2016/04/28 14:33:43
Done.
| |
35 | |
36 struct FunctionInfo { | |
37 const char* name; | |
38 void** pointer; | |
39 }; | |
40 | |
41 static const FunctionInfo functions[]; | |
42 }; | |
43 | |
44 #endif // COMPONENTS_OS_CRYPT_LIBSECRET_LOADER_H_ | |
OLD | NEW |