#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/password_manager/password_manager.h"
-#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/webdata/web_data_service.h"
#include "components/webdata/encryptor/ie7_password_win.h"
+#include "content/public/browser/browser_thread.h"
using autofill::PasswordForm;
using content::BrowserThread;
info.encrypted_data,
&credentials)) {
for (size_t i = 0; i < credentials.size(); ++i) {
- PasswordForm* autofill = new PasswordForm(form);
+ PasswordForm* autofill = new PasswordForm();
autofill->username_value = credentials[i].username;
autofill->password_value = credentials[i].password;
+ autofill->signon_realm = form.signon_realm;
+ autofill->origin = form.origin;
autofill->preferred = true;
autofill->ssl_valid = form.origin.SchemeIsSecure();
autofill->date_created = info.date_created;
+
matching_forms.push_back(autofill);
// Add this PasswordForm to the saved password table. We're on the DB
// thread already, so we use AddLoginImpl.
callback_runner.Run(matched_forms);
}
-PasswordStoreWin::PasswordStoreWin(LoginDatabase* login_database,
- Profile* profile,
- WebDataService* web_data_service)
- : PasswordStoreDefault(login_database, profile) {
+PasswordStoreWin::PasswordStoreWin(
+ scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner,
+ LoginDatabase* login_database,
+ WebDataService* web_data_service)
+ : PasswordStoreDefault(main_thread_runner,
+ db_thread_runner,
+ login_database) {
db_handler_.reset(new DBHandler(web_data_service, this));
}
db_handler_.reset();
}
-void PasswordStoreWin::ShutdownOnUIThread() {
+void PasswordStoreWin::Shutdown() {
BrowserThread::PostTask(
BrowserThread::DB, FROM_HERE,
base::Bind(&PasswordStoreWin::ShutdownOnDBThread, this));
- PasswordStoreDefault::ShutdownOnUIThread();
+ PasswordStoreDefault::Shutdown();
}
void PasswordStoreWin::GetIE7LoginIfNecessary(