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

Unified Diff: components/webdata/encryptor/ie7_password_win.h

Issue 26465006: Fix IE password import (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Renaming ie7_password to ie7_password_win Created 7 years, 2 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: components/webdata/encryptor/ie7_password_win.h
diff --git a/components/webdata/encryptor/ie7_password.h b/components/webdata/encryptor/ie7_password_win.h
similarity index 58%
rename from components/webdata/encryptor/ie7_password.h
rename to components/webdata/encryptor/ie7_password_win.h
index 458426640d8b8350be1e7e1d73fabb3447ee145d..1c7d3b8f2411c832876e361cdb159692c16dd2ee 100644
--- a/components/webdata/encryptor/ie7_password.h
+++ b/components/webdata/encryptor/ie7_password_win.h
@@ -27,16 +27,24 @@ struct IE7PasswordInfo {
namespace ie7_password {
-// Parses a data structure to find the password and the username.
+struct DecryptedCredentials {
+ std::wstring username;
+ std::wstring password;
+};
+
+// Parses a data structure to find passwords and usernames.
+// The collection of bytes in |data| is interpreted as a special PasswordEntry
+// structure. IE saves the login information as a binary dump of this structure.
+// Credentials extracted from |data| end up in |credentials|.
bool GetUserPassFromData(const std::vector<unsigned char>& data,
- std::wstring* username,
- std::wstring* password);
+ std::vector<DecryptedCredentials>* credentials);
-// Decrypts the username and password for a given data vector using the url as
+// Decrypts usernames and passwords for a given data vector using the url as
// the key.
-bool DecryptPassword(const std::wstring& url,
- const std::vector<unsigned char>& data,
- std::wstring* username, std::wstring* password);
+// Output ends up in |credentials|.
+bool DecryptPasswords(const std::wstring& url,
+ const std::vector<unsigned char>& data,
+ std::vector<DecryptedCredentials>* credentials);
// Returns the hash of a url.
std::wstring GetUrlHash(const std::wstring& url);
« no previous file with comments | « components/webdata/encryptor/ie7_password_unittest_win.cc ('k') | components/webdata/encryptor/ie7_password_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698