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

Unified Diff: chrome/browser/password_manager/native_backend_gnome_x.cc

Issue 2196193002: Expanded GnomeKeyringLoader macros (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unnecessary null termination Created 4 years, 5 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: chrome/browser/password_manager/native_backend_gnome_x.cc
diff --git a/chrome/browser/password_manager/native_backend_gnome_x.cc b/chrome/browser/password_manager/native_backend_gnome_x.cc
index 6226858f726aa232451b866e1921ffb1d0aa45fe..1b1049e6360ec4121dd4e3e44eb5a19a9ebd1f19 100644
--- a/chrome/browser/password_manager/native_backend_gnome_x.cc
+++ b/chrome/browser/password_manager/native_backend_gnome_x.cc
@@ -42,20 +42,46 @@ namespace {
const int kMaxPossibleTimeTValue = std::numeric_limits<int>::max();
}
-#define GNOME_KEYRING_DEFINE_POINTER(name) \
- typeof(&::gnome_keyring_##name) GnomeKeyringLoader::gnome_keyring_##name;
-GNOME_KEYRING_FOR_EACH_FUNC(GNOME_KEYRING_DEFINE_POINTER)
-#undef GNOME_KEYRING_DEFINE_POINTER
+typeof(&::gnome_keyring_is_available)
vasilii 2016/08/01 09:51:26 decltype
cfroussios 2016/08/01 10:54:52 Done.
+ GnomeKeyringLoader::gnome_keyring_is_available;
+typeof(&::gnome_keyring_store_password)
+ GnomeKeyringLoader::gnome_keyring_store_password;
+typeof(&::gnome_keyring_delete_password)
+ GnomeKeyringLoader::gnome_keyring_delete_password;
+typeof(&::gnome_keyring_find_items)
+ GnomeKeyringLoader::gnome_keyring_find_items;
+typeof(&::gnome_keyring_result_to_message)
+ GnomeKeyringLoader::gnome_keyring_result_to_message;
+typeof(&::gnome_keyring_attribute_list_free)
+ GnomeKeyringLoader::gnome_keyring_attribute_list_free;
+typeof(&::gnome_keyring_attribute_list_new)
+ GnomeKeyringLoader::gnome_keyring_attribute_list_new;
+typeof(&::gnome_keyring_attribute_list_append_string)
+ GnomeKeyringLoader::gnome_keyring_attribute_list_append_string;
+typeof(&::gnome_keyring_attribute_list_append_uint32)
+ GnomeKeyringLoader::gnome_keyring_attribute_list_append_uint32;
bool GnomeKeyringLoader::keyring_loaded = false;
-#define GNOME_KEYRING_FUNCTION_INFO(name) \
- {"gnome_keyring_"#name, reinterpret_cast<void**>(&gnome_keyring_##name)},
const GnomeKeyringLoader::FunctionInfo GnomeKeyringLoader::functions[] = {
- GNOME_KEYRING_FOR_EACH_FUNC(GNOME_KEYRING_FUNCTION_INFO)
- {nullptr, nullptr}
-};
-#undef GNOME_KEYRING_FUNCTION_INFO
+ {"gnome_keyring_is_available",
+ reinterpret_cast<void**>(&gnome_keyring_is_available)},
vasilii 2016/08/01 09:51:26 Will static_cast work here?
cfroussios 2016/08/01 10:54:52 The compiler does not allow it.
+ {"gnome_keyring_store_password",
+ reinterpret_cast<void**>(&gnome_keyring_store_password)},
+ {"gnome_keyring_delete_password",
+ reinterpret_cast<void**>(&gnome_keyring_delete_password)},
+ {"gnome_keyring_find_items",
+ reinterpret_cast<void**>(&gnome_keyring_find_items)},
+ {"gnome_keyring_result_to_message",
+ reinterpret_cast<void**>(&gnome_keyring_result_to_message)},
+ {"gnome_keyring_attribute_list_free",
+ reinterpret_cast<void**>(&gnome_keyring_attribute_list_free)},
+ {"gnome_keyring_attribute_list_new",
+ reinterpret_cast<void**>(&gnome_keyring_attribute_list_new)},
+ {"gnome_keyring_attribute_list_append_string",
+ reinterpret_cast<void**>(&gnome_keyring_attribute_list_append_string)},
+ {"gnome_keyring_attribute_list_append_uint32",
+ reinterpret_cast<void**>(&gnome_keyring_attribute_list_append_uint32)}};
/* Load the library and initialize the function pointers. */
bool GnomeKeyringLoader::LoadGnomeKeyring() {

Powered by Google App Engine
This is Rietveld 408576698