Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: chrome/browser/importer/nss_decryptor_win.h

Issue 160077: Linux: Fix NSSDecryptor to import Firefox passwords from the user database correctly. (Closed)
Patch Set: Add comments. Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/importer/nss_decryptor_mac.h ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_IMPORTER_NSS_DECRYPTOR_WIN_H_ 5 #ifndef CHROME_BROWSER_IMPORTER_NSS_DECRYPTOR_WIN_H_
6 #define CHROME_BROWSER_IMPORTER_NSS_DECRYPTOR_WIN_H_ 6 #define CHROME_BROWSER_IMPORTER_NSS_DECRYPTOR_WIN_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // The result will be stored in |forms|. 130 // The result will be stored in |forms|.
131 void ParseSignons(const std::string& content, 131 void ParseSignons(const std::string& content,
132 std::vector<webkit_glue::PasswordForm>* forms); 132 std::vector<webkit_glue::PasswordForm>* forms);
133 133
134 private: 134 private:
135 // Performs tasks common across all platforms to initialize NSS. 135 // Performs tasks common across all platforms to initialize NSS.
136 bool InitNSS(const std::wstring& db_path, 136 bool InitNSS(const std::wstring& db_path,
137 base::NativeLibrary plds4_dll, 137 base::NativeLibrary plds4_dll,
138 base::NativeLibrary nspr4_dll); 138 base::NativeLibrary nspr4_dll);
139 139
140 PK11SlotInfo* GetKeySlotForDB() const { return PK11_GetInternalKeySlot(); }
141 void FreeSlot(PK11SlotInfo* slot) const { PK11_FreeSlot(slot); }
142
140 // Methods in Firefox security components. 143 // Methods in Firefox security components.
141 NSSInitFunc NSS_Init; 144 NSSInitFunc NSS_Init;
142 NSSShutdownFunc NSS_Shutdown; 145 NSSShutdownFunc NSS_Shutdown;
143 PK11GetInternalKeySlotFunc PK11_GetInternalKeySlot; 146 PK11GetInternalKeySlotFunc PK11_GetInternalKeySlot;
144 PK11CheckUserPasswordFunc PK11_CheckUserPassword; 147 PK11CheckUserPasswordFunc PK11_CheckUserPassword;
145 PK11FreeSlotFunc PK11_FreeSlot; 148 PK11FreeSlotFunc PK11_FreeSlot;
146 PK11AuthenticateFunc PK11_Authenticate; 149 PK11AuthenticateFunc PK11_Authenticate;
147 PK11SDRDecryptFunc PK11SDR_Decrypt; 150 PK11SDRDecryptFunc PK11SDR_Decrypt;
148 SECITEMFreeItemFunc SECITEM_FreeItem; 151 SECITEMFreeItemFunc SECITEM_FreeItem;
149 PLArenaFinishFunc PL_ArenaFinish; 152 PLArenaFinishFunc PL_ArenaFinish;
150 PRCleanupFunc PR_Cleanup; 153 PRCleanupFunc PR_Cleanup;
151 154
152 // Libraries necessary for decrypting the passwords. 155 // Libraries necessary for decrypting the passwords.
153 static const wchar_t kNSS3Library[]; 156 static const wchar_t kNSS3Library[];
154 static const wchar_t kSoftokn3Library[]; 157 static const wchar_t kSoftokn3Library[];
155 static const wchar_t kPLDS4Library[]; 158 static const wchar_t kPLDS4Library[];
156 static const wchar_t kNSPR4Library[]; 159 static const wchar_t kNSPR4Library[];
157 160
158 // NSS3 module handles. 161 // NSS3 module handles.
159 base::NativeLibrary nss3_dll_; 162 base::NativeLibrary nss3_dll_;
160 base::NativeLibrary softokn3_dll_; 163 base::NativeLibrary softokn3_dll_;
161 164
162 // True if NSS_Init() has been called 165 // True if NSS_Init() has been called
163 bool is_nss_initialized_; 166 bool is_nss_initialized_;
164 167
165 DISALLOW_COPY_AND_ASSIGN(NSSDecryptor); 168 DISALLOW_COPY_AND_ASSIGN(NSSDecryptor);
166 }; 169 };
167 170
168 #endif // CHROME_BROWSER_IMPORTER_NSS_DECRYPTOR_WIN_H_ 171 #endif // CHROME_BROWSER_IMPORTER_NSS_DECRYPTOR_WIN_H_
OLDNEW
« no previous file with comments | « chrome/browser/importer/nss_decryptor_mac.h ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698