OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_UTILITY_IMPORTER_NSS_DECRYPTOR_MAC_H_ | 5 #ifndef CHROME_UTILITY_IMPORTER_NSS_DECRYPTOR_MAC_H_ |
6 #define CHROME_UTILITY_IMPORTER_NSS_DECRYPTOR_MAC_H_ | 6 #define CHROME_UTILITY_IMPORTER_NSS_DECRYPTOR_MAC_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 PK11_CheckUserPassword(NULL), PK11_FreeSlot(NULL), | 119 PK11_CheckUserPassword(NULL), PK11_FreeSlot(NULL), |
120 PK11_Authenticate(NULL), PK11SDR_Decrypt(NULL), SECITEM_FreeItem(NULL), | 120 PK11_Authenticate(NULL), PK11SDR_Decrypt(NULL), SECITEM_FreeItem(NULL), |
121 is_nss_initialized_(false) {} | 121 is_nss_initialized_(false) {} |
122 ~NSSDecryptor(); | 122 ~NSSDecryptor(); |
123 | 123 |
124 // Initializes NSS if it hasn't already been initialized. | 124 // Initializes NSS if it hasn't already been initialized. |
125 bool Init(const base::FilePath& dll_path, const base::FilePath& db_path); | 125 bool Init(const base::FilePath& dll_path, const base::FilePath& db_path); |
126 | 126 |
127 // Decrypts Firefox stored passwords. Before using this method, | 127 // Decrypts Firefox stored passwords. Before using this method, |
128 // make sure Init() returns true. | 128 // make sure Init() returns true. |
129 string16 Decrypt(const std::string& crypt) const; | 129 base::string16 Decrypt(const std::string& crypt) const; |
130 | 130 |
131 // Parses the Firefox password file content, decrypts the | 131 // Parses the Firefox password file content, decrypts the |
132 // username/password and reads other related information. | 132 // username/password and reads other related information. |
133 // The result will be stored in |forms|. | 133 // The result will be stored in |forms|. |
134 void ParseSignons(const std::string& content, | 134 void ParseSignons(const std::string& content, |
135 std::vector<autofill::PasswordForm>* forms); | 135 std::vector<autofill::PasswordForm>* forms); |
136 | 136 |
137 // Reads and parses the Firefox password sqlite db, decrypts the | 137 // Reads and parses the Firefox password sqlite db, decrypts the |
138 // username/password and reads other related information. | 138 // username/password and reads other related information. |
139 // The result will be stored in |forms|. | 139 // The result will be stored in |forms|. |
(...skipping 13 matching lines...) Expand all Loading... |
153 PK11SDRDecryptFunc PK11SDR_Decrypt; | 153 PK11SDRDecryptFunc PK11SDR_Decrypt; |
154 SECITEMFreeItemFunc SECITEM_FreeItem; | 154 SECITEMFreeItemFunc SECITEM_FreeItem; |
155 | 155 |
156 // True if NSS_Init() has been called | 156 // True if NSS_Init() has been called |
157 bool is_nss_initialized_; | 157 bool is_nss_initialized_; |
158 | 158 |
159 DISALLOW_COPY_AND_ASSIGN(NSSDecryptor); | 159 DISALLOW_COPY_AND_ASSIGN(NSSDecryptor); |
160 }; | 160 }; |
161 | 161 |
162 #endif // CHROME_UTILITY_IMPORTER_NSS_DECRYPTOR_MAC_H_ | 162 #endif // CHROME_UTILITY_IMPORTER_NSS_DECRYPTOR_MAC_H_ |
OLD | NEW |