| 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_WIN_H_ | 5 #ifndef CHROME_UTILITY_IMPORTER_NSS_DECRYPTOR_WIN_H_ |
| 6 #define CHROME_UTILITY_IMPORTER_NSS_DECRYPTOR_WIN_H_ | 6 #define CHROME_UTILITY_IMPORTER_NSS_DECRYPTOR_WIN_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // Loads NSS3 library and returns true if successful. | 117 // Loads NSS3 library and returns true if successful. |
| 118 // |dll_path| indicates the location of NSS3 DLL files, and |db_path| | 118 // |dll_path| indicates the location of NSS3 DLL files, and |db_path| |
| 119 // is the location of the database file that stores the keys. | 119 // is the location of the database file that stores the keys. |
| 120 bool Init(const base::FilePath& dll_path, const base::FilePath& db_path); | 120 bool Init(const base::FilePath& dll_path, const base::FilePath& db_path); |
| 121 | 121 |
| 122 // Frees the libraries. | 122 // Frees the libraries. |
| 123 void Free(); | 123 void Free(); |
| 124 | 124 |
| 125 // Decrypts Firefox stored passwords. Before using this method, | 125 // Decrypts Firefox stored passwords. Before using this method, |
| 126 // make sure Init() returns true. | 126 // make sure Init() returns true. |
| 127 string16 Decrypt(const std::string& crypt) const; | 127 base::string16 Decrypt(const std::string& crypt) const; |
| 128 | 128 |
| 129 // Parses the Firefox password file content, decrypts the | 129 // Parses the Firefox password file content, decrypts the |
| 130 // username/password and reads other related information. | 130 // username/password and reads other related information. |
| 131 // The result will be stored in |forms|. | 131 // The result will be stored in |forms|. |
| 132 void ParseSignons(const std::string& content, | 132 void ParseSignons(const std::string& content, |
| 133 std::vector<autofill::PasswordForm>* forms); | 133 std::vector<autofill::PasswordForm>* forms); |
| 134 | 134 |
| 135 // Reads and parses the Firefox password sqlite db, decrypts the | 135 // Reads and parses the Firefox password sqlite db, decrypts the |
| 136 // username/password and reads other related information. | 136 // username/password and reads other related information. |
| 137 // The result will be stored in |forms|. | 137 // The result will be stored in |forms|. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 base::NativeLibrary nss3_dll_; | 169 base::NativeLibrary nss3_dll_; |
| 170 base::NativeLibrary softokn3_dll_; | 170 base::NativeLibrary softokn3_dll_; |
| 171 | 171 |
| 172 // True if NSS_Init() has been called | 172 // True if NSS_Init() has been called |
| 173 bool is_nss_initialized_; | 173 bool is_nss_initialized_; |
| 174 | 174 |
| 175 DISALLOW_COPY_AND_ASSIGN(NSSDecryptor); | 175 DISALLOW_COPY_AND_ASSIGN(NSSDecryptor); |
| 176 }; | 176 }; |
| 177 | 177 |
| 178 #endif // CHROME_UTILITY_IMPORTER_NSS_DECRYPTOR_WIN_H_ | 178 #endif // CHROME_UTILITY_IMPORTER_NSS_DECRYPTOR_WIN_H_ |
| OLD | NEW |