OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 extern "C" { | |
9 #include <gnome-keyring.h> | |
10 } | |
11 | |
12 #include <vector> | 8 #include <vector> |
13 | 9 |
14 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
15 #include "base/time.h" | 11 #include "base/time.h" |
16 #include "chrome/browser/password_manager/password_store_x.h" | 12 #include "chrome/browser/password_manager/password_store_x.h" |
17 | 13 |
18 namespace webkit_glue { | 14 namespace webkit_glue { |
19 struct PasswordForm; | 15 struct PasswordForm; |
20 } | 16 } |
21 | 17 |
(...skipping 20 matching lines...) Expand all Loading... |
42 virtual bool GetAutofillableLogins(PasswordFormList* forms); | 38 virtual bool GetAutofillableLogins(PasswordFormList* forms); |
43 virtual bool GetBlacklistLogins(PasswordFormList* forms); | 39 virtual bool GetBlacklistLogins(PasswordFormList* forms); |
44 | 40 |
45 private: | 41 private: |
46 // Reads PasswordForms from the keyring with the given autofillability state. | 42 // Reads PasswordForms from the keyring with the given autofillability state. |
47 bool GetLoginsList(PasswordFormList* forms, bool autofillable); | 43 bool GetLoginsList(PasswordFormList* forms, bool autofillable); |
48 | 44 |
49 // Helper for GetLoginsCreatedBetween(). | 45 // Helper for GetLoginsCreatedBetween(). |
50 bool GetAllLogins(PasswordFormList* forms); | 46 bool GetAllLogins(PasswordFormList* forms); |
51 | 47 |
52 // Parse all the results from the given GList into a PasswordFormList, and | |
53 // free the GList. PasswordForms are allocated on the heap, and should be | |
54 // deleted by the consumer. | |
55 void ConvertFormList(GList* found, PasswordFormList* forms); | |
56 | |
57 static const GnomeKeyringPasswordSchema kGnomeSchema; | |
58 | |
59 DISALLOW_COPY_AND_ASSIGN(NativeBackendGnome); | 48 DISALLOW_COPY_AND_ASSIGN(NativeBackendGnome); |
60 }; | 49 }; |
61 | 50 |
62 #endif // CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_GNOME_X_H_ | 51 #endif // CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_GNOME_X_H_ |
OLD | NEW |