Chromium Code Reviews| Index: chrome/browser/password_manager/native_backend_gnome_x.h |
| diff --git a/chrome/browser/password_manager/native_backend_gnome_x.h b/chrome/browser/password_manager/native_backend_gnome_x.h |
| index 1502f66cb37636ba5afc2ab717ae16467fd29d37..7f4e073eef271e0da040e604336ac3fb9f6ef0c5 100644 |
| --- a/chrome/browser/password_manager/native_backend_gnome_x.h |
| +++ b/chrome/browser/password_manager/native_backend_gnome_x.h |
| @@ -42,30 +42,22 @@ class GnomeKeyringLoader { |
| protected: |
| static bool LoadGnomeKeyring(); |
| -// Call a given parameter with the name of each function we use from GNOME |
| -// Keyring. Make sure to adjust the unit test if you change these. |
| -// The list of functions is divided into those we plan to mock in the unittest, |
| -// and those which we use without mocking in the test. |
| -#define GNOME_KEYRING_FOR_EACH_MOCKED_FUNC(F) \ |
| - F(is_available) \ |
| - F(store_password) \ |
| - F(delete_password) \ |
| - F(find_items) \ |
| - F(result_to_message) |
| -#define GNOME_KEYRING_FOR_EACH_NON_MOCKED_FUNC(F) \ |
| - F(attribute_list_free) \ |
| - F(attribute_list_new) \ |
| - F(attribute_list_append_string) \ |
| - F(attribute_list_append_uint32) |
| -#define GNOME_KEYRING_FOR_EACH_FUNC(F) \ |
| - GNOME_KEYRING_FOR_EACH_NON_MOCKED_FUNC(F) \ |
| - GNOME_KEYRING_FOR_EACH_MOCKED_FUNC(F) |
| - |
| -// Declare the actual function pointers that we'll use in client code. |
| -#define GNOME_KEYRING_DECLARE_POINTER(name) \ |
| - static decltype(&::gnome_keyring_##name) gnome_keyring_##name; |
| - GNOME_KEYRING_FOR_EACH_FUNC(GNOME_KEYRING_DECLARE_POINTER) |
| -#undef GNOME_KEYRING_DECLARE_POINTER |
| + // Declare the actual function pointers that we'll use in client code. |
| + static decltype(&::gnome_keyring_is_available) gnome_keyring_is_available; |
|
vasilii
2016/08/01 09:51:26
Do you deliberately reuse the same names?
cfroussios
2016/08/01 10:54:52
That's the names that the macros would produce. Ar
vasilii
2016/08/01 11:46:37
I'd use gnome_keyring_is_available_ptr. I'm totall
cfroussios
2016/08/01 14:31:04
I used ptr. I didn't get rid of the prefix, becaus
|
| + static decltype(&::gnome_keyring_store_password) gnome_keyring_store_password; |
| + static decltype( |
| + &::gnome_keyring_delete_password) gnome_keyring_delete_password; |
| + static decltype(&::gnome_keyring_find_items) gnome_keyring_find_items; |
| + static decltype( |
| + &::gnome_keyring_result_to_message) gnome_keyring_result_to_message; |
| + static decltype( |
| + &::gnome_keyring_attribute_list_free) gnome_keyring_attribute_list_free; |
| + static decltype( |
| + &::gnome_keyring_attribute_list_new) gnome_keyring_attribute_list_new; |
| + static decltype(&::gnome_keyring_attribute_list_append_string) |
| + gnome_keyring_attribute_list_append_string; |
| + static decltype(&::gnome_keyring_attribute_list_append_uint32) |
| + gnome_keyring_attribute_list_append_uint32; |
| // Set to true if LoadGnomeKeyring() has already succeeded. |
| static bool keyring_loaded; |