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

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

Issue 159165: Split NSSDecryptor out into platform specific files.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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
===================================================================
--- chrome/browser/importer/nss_decryptor_linux.h (revision 0)
+++ chrome/browser/importer/nss_decryptor_linux.h (revision 0)
@@ -0,0 +1,43 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_IMPORTER_NSS_DECRYPTOR_LINUX_H_
+#define CHROME_BROWSER_IMPORTER_NSS_DECRYPTOR_LINUX_H_
+
+#include <string>
+#include <vector>
+
+#include "base/basictypes.h"
+
+namespace webkit_glue {
+struct PasswordForm;
+}
+
+// A wrapper for Firefox NSS decrypt component.
+class NSSDecryptor {
+ public:
+ NSSDecryptor();
+ ~NSSDecryptor();
+
+ // Initializes NSS if it hasn't already been initialized.
+ bool Init(const std::wstring& /* dll_path */,
+ const std::wstring& /* db_path */);
+
+ // Decrypts Firefox stored passwords. Before using this method,
+ // make sure Init() returns true.
+ std::wstring Decrypt(const std::string& crypt) const;
+
+ // Parses the Firefox password file content, decrypts the
+ // username/password and reads other related information.
+ // The result will be stored in |forms|.
+ void ParseSignons(const std::string& content,
+ std::vector<webkit_glue::PasswordForm>* forms);
+
+ private:
+ bool is_nss_initialized_;
+
+ DISALLOW_COPY_AND_ASSIGN(NSSDecryptor);
+};
+
+#endif // CHROME_BROWSER_IMPORTER_NSS_DECRYPTOR_LINUX_H_
Property changes on: chrome/browser/importer/nss_decryptor_linux.h
___________________________________________________________________
Name: svn:eol-style
+ LF
« 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