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

Unified Diff: chrome/browser/importer/nss_decryptor_linux.h

Issue 160077: Linux: Fix NSSDecryptor to import Firefox passwords from the user database correctly. (Closed)
Patch Set: Add comments. Created 11 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/importer/nss_decryptor.cc ('k') | chrome/browser/importer/nss_decryptor_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/importer/nss_decryptor_linux.h
diff --git a/chrome/browser/importer/nss_decryptor_linux.h b/chrome/browser/importer/nss_decryptor_linux.h
index 6a9b7ca6d319e21eca05d76808d94f7a21ac5088..508b30a6c9f453a4b8b2d8940a0a5a3630d56d58 100644
--- a/chrome/browser/importer/nss_decryptor_linux.h
+++ b/chrome/browser/importer/nss_decryptor_linux.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_IMPORTER_NSS_DECRYPTOR_LINUX_H_
#define CHROME_BROWSER_IMPORTER_NSS_DECRYPTOR_LINUX_H_
+#include <secmodt.h>
#include <string>
#include <vector>
@@ -22,7 +23,7 @@ class NSSDecryptor {
// Initializes NSS if it hasn't already been initialized.
bool Init(const std::wstring& /* dll_path */,
- const std::wstring& /* db_path */);
+ const std::wstring& db_path);
// Decrypts Firefox stored passwords. Before using this method,
// make sure Init() returns true.
@@ -35,7 +36,16 @@ class NSSDecryptor {
std::vector<webkit_glue::PasswordForm>* forms);
private:
+ // Does not actually free the slot, since we'll free it when NSSDecryptor is
+ // destroyed.
+ void FreeSlot(PK11SlotInfo* slot) const {};
+ PK11SlotInfo* GetKeySlotForDB() const { return db_slot_; }
+
+ SECStatus PK11SDR_DecryptWithSlot(
+ PK11SlotInfo* slot, SECItem* data, SECItem* result, void* cx) const;
+
bool is_nss_initialized_;
+ PK11SlotInfo* db_slot_;
DISALLOW_COPY_AND_ASSIGN(NSSDecryptor);
};
« no previous file with comments | « chrome/browser/importer/nss_decryptor.cc ('k') | chrome/browser/importer/nss_decryptor_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698