| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_GNOME_X_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_GNOME_X_H_ |
| 6 #define CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_GNOME_X_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_GNOME_X_H_ |
| 7 | 7 |
| 8 // libgnome-keyring has been deprecated in favor of libsecret. | 8 // libgnome-keyring has been deprecated in favor of libsecret. |
| 9 // See: https://mail.gnome.org/archives/commits-list/2013-October/msg08876.html | 9 // See: https://mail.gnome.org/archives/commits-list/2013-October/msg08876.html |
| 10 // | 10 // |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 F(attribute_list_free) \ | 54 F(attribute_list_free) \ |
| 55 F(attribute_list_new) \ | 55 F(attribute_list_new) \ |
| 56 F(attribute_list_append_string) \ | 56 F(attribute_list_append_string) \ |
| 57 F(attribute_list_append_uint32) | 57 F(attribute_list_append_uint32) |
| 58 #define GNOME_KEYRING_FOR_EACH_FUNC(F) \ | 58 #define GNOME_KEYRING_FOR_EACH_FUNC(F) \ |
| 59 GNOME_KEYRING_FOR_EACH_NON_MOCKED_FUNC(F) \ | 59 GNOME_KEYRING_FOR_EACH_NON_MOCKED_FUNC(F) \ |
| 60 GNOME_KEYRING_FOR_EACH_MOCKED_FUNC(F) | 60 GNOME_KEYRING_FOR_EACH_MOCKED_FUNC(F) |
| 61 | 61 |
| 62 // Declare the actual function pointers that we'll use in client code. | 62 // Declare the actual function pointers that we'll use in client code. |
| 63 #define GNOME_KEYRING_DECLARE_POINTER(name) \ | 63 #define GNOME_KEYRING_DECLARE_POINTER(name) \ |
| 64 static typeof(&::gnome_keyring_##name) gnome_keyring_##name; | 64 static decltype(&::gnome_keyring_##name) gnome_keyring_##name; |
| 65 GNOME_KEYRING_FOR_EACH_FUNC(GNOME_KEYRING_DECLARE_POINTER) | 65 GNOME_KEYRING_FOR_EACH_FUNC(GNOME_KEYRING_DECLARE_POINTER) |
| 66 #undef GNOME_KEYRING_DECLARE_POINTER | 66 #undef GNOME_KEYRING_DECLARE_POINTER |
| 67 | 67 |
| 68 // Set to true if LoadGnomeKeyring() has already succeeded. | 68 // Set to true if LoadGnomeKeyring() has already succeeded. |
| 69 static bool keyring_loaded; | 69 static bool keyring_loaded; |
| 70 | 70 |
| 71 private: | 71 private: |
| 72 #if defined(DLOPEN_GNOME_KEYRING) | 72 #if defined(DLOPEN_GNOME_KEYRING) |
| 73 struct FunctionInfo { | 73 struct FunctionInfo { |
| 74 const char* name; | 74 const char* name; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // The local profile id, used to generate the app string. | 144 // The local profile id, used to generate the app string. |
| 145 const LocalProfileId profile_id_; | 145 const LocalProfileId profile_id_; |
| 146 | 146 |
| 147 // The app string, possibly based on the local profile id. | 147 // The app string, possibly based on the local profile id. |
| 148 std::string app_string_; | 148 std::string app_string_; |
| 149 | 149 |
| 150 DISALLOW_COPY_AND_ASSIGN(NativeBackendGnome); | 150 DISALLOW_COPY_AND_ASSIGN(NativeBackendGnome); |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 #endif // CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_GNOME_X_H_ | 153 #endif // CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_GNOME_X_H_ |
| OLD | NEW |