Commit 4a4ee373 authored by Vadym Doroshenko's avatar Vadym Doroshenko Committed by Commit Bot

Clean-ups after removal the old parser.

Bug: 949519
Change-Id: I96148de31cb627ed14a5df6f779a24703c0046fb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1827420Reviewed-by: default avatarMatthias Körber <koerber@google.com>
Commit-Queue: Matthias Körber <koerber@google.com>
Commit-Queue: Vadym Doroshenko <dvadym@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700247}
parent 955ad497
......@@ -264,7 +264,6 @@ void PasswordFormManager::Save() {
newly_blacklisted_ = false;
}
// TODO(https://crbug.com/831123): Implement indicator event metrics.
if (password_overridden_ &&
pending_credentials_.type == PasswordForm::Type::kGenerated &&
!HasGeneratedPassword()) {
......@@ -484,9 +483,8 @@ bool PasswordFormManager::IsPasswordUpdate() const {
return password_overridden_;
}
std::vector<base::WeakPtr<PasswordManagerDriver>>
PasswordFormManager::GetDrivers() const {
return {driver_};
base::WeakPtr<PasswordManagerDriver> PasswordFormManager::GetDriver() const {
return driver_;
}
const PasswordForm* PasswordFormManager::GetSubmittedForm() const {
......
......@@ -102,10 +102,6 @@ class PasswordFormManager : public PasswordFormManagerForUI,
bool is_submitted() { return is_submitted_; }
void set_not_submitted() { is_submitted_ = false; }
void set_old_parsing_result(const autofill::PasswordForm& form) {
old_parsing_result_ = form;
}
// Returns true if |*this| manages http authentication.
bool IsHttpAuth() const;
......@@ -171,7 +167,7 @@ class PasswordFormManager : public PasswordFormManagerForUI,
void SetGenerationElement(const base::string16& generation_element);
bool IsPossibleChangePasswordFormWithoutUsername() const;
bool IsPasswordUpdate() const;
std::vector<base::WeakPtr<PasswordManagerDriver>> GetDrivers() const;
base::WeakPtr<PasswordManagerDriver> GetDriver() const;
const autofill::PasswordForm* GetSubmittedForm() const;
#if defined(OS_IOS)
......@@ -354,11 +350,6 @@ class PasswordFormManager : public PasswordFormManagerForUI,
// Controls whether to wait or not server before filling. It is used in tests.
static bool wait_for_server_predictions_for_filling_;
// Used for comparison metrics.
// TODO(https://crbug.com/831123): Remove it when the old form parsing is
// removed.
autofill::PasswordForm old_parsing_result_;
// Time when stored credentials are received from the store. Used for metrics.
base::TimeTicks received_stored_credentials_time_;
......
......@@ -348,10 +348,8 @@ void PasswordManager::UpdateFormManagers() {
std::vector<PasswordManagerDriver*> drivers;
for (PasswordFormManager* form_manager : form_managers) {
fetchers.push_back(form_manager->GetFormFetcher());
for (const auto& driver : form_manager->GetDrivers()) {
if (driver)
drivers.push_back(driver.get());
}
if (form_manager->GetDriver())
drivers.push_back(form_manager->GetDriver().get());
}
// Remove the duplicates.
......@@ -570,10 +568,8 @@ void PasswordManager::CreateFormManagers(
}
// Create form manager for new forms.
for (const PasswordForm* new_form : new_forms) {
auto* manager = CreateFormManager(driver, new_form->form_data);
manager->set_old_parsing_result(*new_form);
}
for (const PasswordForm* new_form : new_forms)
CreateFormManager(driver, new_form->form_data);
}
PasswordFormManager* PasswordManager::CreateFormManager(
......
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