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

Unified Diff: components/os_crypt/keyring_util_linux.h

Issue 2297573002: Implement gnome-keyring for OSCrypt (Closed)
Patch Set: Fixed malloc - delete mismatch Created 4 years, 4 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
Index: components/os_crypt/keyring_util_linux.h
diff --git a/components/os_crypt/keyring_util_linux.h b/components/os_crypt/keyring_util_linux.h
index 4302c838795c8d845012e7128b73562be1e40e41..d5cfb36752d0c08d6efccf974ad5f5506a241179 100644
--- a/components/os_crypt/keyring_util_linux.h
+++ b/components/os_crypt/keyring_util_linux.h
@@ -27,10 +27,11 @@
// from GnomeKeyringLoader will use its versions of the gnome_keyring_*
// functions. Note that it has only static fields.
class GnomeKeyringLoader {
- protected:
+ public:
static bool LoadGnomeKeyring();
- // Declare the actual function pointers that we'll use in client code.
+ // Declare the actual function pointers that we'll use in client code.\
+ // These functions may contact the keyring database.
static decltype(&::gnome_keyring_is_available) gnome_keyring_is_available_ptr;
static decltype(
&::gnome_keyring_store_password) gnome_keyring_store_password_ptr;
@@ -38,6 +39,12 @@ class GnomeKeyringLoader {
&::gnome_keyring_delete_password) gnome_keyring_delete_password_ptr;
static decltype(&::gnome_keyring_find_items) gnome_keyring_find_items_ptr;
static decltype(
+ &::gnome_keyring_find_password_sync) gnome_keyring_find_password_sync_ptr;
+ static decltype(&::gnome_keyring_store_password_sync)
+ gnome_keyring_store_password_sync_ptr;
+
+ // These functions are cheaper.
+ static decltype(
&::gnome_keyring_result_to_message) gnome_keyring_result_to_message_ptr;
static decltype(&::gnome_keyring_attribute_list_free)
gnome_keyring_attribute_list_free_ptr;
@@ -47,9 +54,12 @@ class GnomeKeyringLoader {
gnome_keyring_attribute_list_append_string_ptr;
static decltype(&::gnome_keyring_attribute_list_append_uint32)
gnome_keyring_attribute_list_append_uint32_ptr;
+ static decltype(
+ &::gnome_keyring_free_password) gnome_keyring_free_password_ptr;
// We also use gnome_keyring_attribute_list_index(), which is a macro and
// can't be referenced.
+ protected:
// Set to true if LoadGnomeKeyring() has already succeeded.
static bool keyring_loaded;

Powered by Google App Engine
This is Rietveld 408576698