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

Unified Diff: chrome/utility/importer/firefox_importer_unittest_utils.h

Issue 306123004: NSSDecryptor::ReadAndParseSignons() - improved password form scheme detection, (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Naming fix Created 6 years, 6 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
Index: chrome/utility/importer/firefox_importer_unittest_utils.h
diff --git a/chrome/utility/importer/firefox_importer_unittest_utils.h b/chrome/utility/importer/firefox_importer_unittest_utils.h
index 2c20991629b8620b85ec0e6a19ee38582b0d095a..aca613d615f5b45d15572afbbeadf1c892af4475 100644
--- a/chrome/utility/importer/firefox_importer_unittest_utils.h
+++ b/chrome/utility/importer/firefox_importer_unittest_utils.h
@@ -6,9 +6,11 @@
#define CHROME_UTILITY_IMPORTER_FIREFOX_IMPORTER_UNITTEST_UTILS_H_
#include "base/basictypes.h"
+#include "base/file_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/process/process_handle.h"
#include "chrome/utility/importer/nss_decryptor.h"
+#include "components/autofill/core/common/password_form.h"
class FFDecryptorServerChannelListener;
@@ -44,6 +46,8 @@ class FFUnitTestDecryptorProxy {
bool DecryptorInit(const base::FilePath& dll_path,
const base::FilePath& db_path);
base::string16 Decrypt(const std::string& crypt);
+ std::vector<autofill::PasswordForm> ParseSignons(
+ const base::FilePath& signons_path);
private:
#if defined(OS_MACOSX)
@@ -84,6 +88,16 @@ bool FFUnitTestDecryptorProxy::DecryptorInit(const base::FilePath& dll_path,
base::string16 FFUnitTestDecryptorProxy::Decrypt(const std::string& crypt) {
return decryptor_.Decrypt(crypt);
}
+
+std::vector<autofill::PasswordForm> FFUnitTestDecryptorProxy::ParseSignons(
+ const base::FilePath& signons_path) {
+ std::vector<autofill::PasswordForm> signons;
+ if (decryptor_.ReadAndParseSignons(signons_path, &signons))
+ return signons;
+
+ return std::vector<autofill::PasswordForm>();
+}
+
#endif // !OS_MACOSX
#endif // CHROME_UTILITY_IMPORTER_FIREFOX_IMPORTER_UNITTEST_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698