Commit 7b9995c5 authored by vasilii's avatar vasilii Committed by Commit bot

Revert "Track empty username and password in PasswordStore."

This reverts https://codereview.chromium.org/493123002. There were too many generated crashes.

BUG=407767

Review URL: https://codereview.chromium.org/512673002

Cr-Commit-Position: refs/heads/master@{#292134}
parent 68833550
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include <limits> #include <limits>
#include "base/bind.h" #include "base/bind.h"
#include "base/debug/dump_without_crashing.h"
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/metrics/histogram.h" #include "base/metrics/histogram.h"
...@@ -118,12 +117,6 @@ void AddCallback(int err, sql::Statement* /*stmt*/) { ...@@ -118,12 +117,6 @@ void AddCallback(int err, sql::Statement* /*stmt*/) {
DLOG(WARNING) << "LoginDatabase::AddLogin updated an existing form"; DLOG(WARNING) << "LoginDatabase::AddLogin updated an existing form";
} }
// http://crbug.com/404012. Let's see where the empty fields come from.
void CheckForEmptyUsernameAndPassword(const PasswordForm& form) {
if (form.username_value.empty() && form.password_value.empty())
base::debug::DumpWithoutCrashing();
}
} // namespace } // namespace
LoginDatabase::LoginDatabase() { LoginDatabase::LoginDatabase() {
...@@ -359,7 +352,6 @@ void LoginDatabase::ReportMetrics(const std::string& sync_username) { ...@@ -359,7 +352,6 @@ void LoginDatabase::ReportMetrics(const std::string& sync_username) {
} }
PasswordStoreChangeList LoginDatabase::AddLogin(const PasswordForm& form) { PasswordStoreChangeList LoginDatabase::AddLogin(const PasswordForm& form) {
CheckForEmptyUsernameAndPassword(form);
PasswordStoreChangeList list; PasswordStoreChangeList list;
std::string encrypted_password; std::string encrypted_password;
if (EncryptedString(form.password_value, &encrypted_password) != if (EncryptedString(form.password_value, &encrypted_password) !=
...@@ -403,7 +395,6 @@ PasswordStoreChangeList LoginDatabase::AddLogin(const PasswordForm& form) { ...@@ -403,7 +395,6 @@ PasswordStoreChangeList LoginDatabase::AddLogin(const PasswordForm& form) {
} }
PasswordStoreChangeList LoginDatabase::UpdateLogin(const PasswordForm& form) { PasswordStoreChangeList LoginDatabase::UpdateLogin(const PasswordForm& form) {
CheckForEmptyUsernameAndPassword(form);
std::string encrypted_password; std::string encrypted_password;
if (EncryptedString(form.password_value, &encrypted_password) != if (EncryptedString(form.password_value, &encrypted_password) !=
ENCRYPTION_RESULT_SUCCESS) ENCRYPTION_RESULT_SUCCESS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment