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() { ...@@ -264,7 +264,6 @@ void PasswordFormManager::Save() {
newly_blacklisted_ = false; newly_blacklisted_ = false;
} }
// TODO(https://crbug.com/831123): Implement indicator event metrics.
if (password_overridden_ && if (password_overridden_ &&
pending_credentials_.type == PasswordForm::Type::kGenerated && pending_credentials_.type == PasswordForm::Type::kGenerated &&
!HasGeneratedPassword()) { !HasGeneratedPassword()) {
...@@ -484,9 +483,8 @@ bool PasswordFormManager::IsPasswordUpdate() const { ...@@ -484,9 +483,8 @@ bool PasswordFormManager::IsPasswordUpdate() const {
return password_overridden_; return password_overridden_;
} }
std::vector<base::WeakPtr<PasswordManagerDriver>> base::WeakPtr<PasswordManagerDriver> PasswordFormManager::GetDriver() const {
PasswordFormManager::GetDrivers() const { return driver_;
return {driver_};
} }
const PasswordForm* PasswordFormManager::GetSubmittedForm() const { const PasswordForm* PasswordFormManager::GetSubmittedForm() const {
......
...@@ -102,10 +102,6 @@ class PasswordFormManager : public PasswordFormManagerForUI, ...@@ -102,10 +102,6 @@ class PasswordFormManager : public PasswordFormManagerForUI,
bool is_submitted() { return is_submitted_; } bool is_submitted() { return is_submitted_; }
void set_not_submitted() { is_submitted_ = false; } 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. // Returns true if |*this| manages http authentication.
bool IsHttpAuth() const; bool IsHttpAuth() const;
...@@ -171,7 +167,7 @@ class PasswordFormManager : public PasswordFormManagerForUI, ...@@ -171,7 +167,7 @@ class PasswordFormManager : public PasswordFormManagerForUI,
void SetGenerationElement(const base::string16& generation_element); void SetGenerationElement(const base::string16& generation_element);
bool IsPossibleChangePasswordFormWithoutUsername() const; bool IsPossibleChangePasswordFormWithoutUsername() const;
bool IsPasswordUpdate() const; bool IsPasswordUpdate() const;
std::vector<base::WeakPtr<PasswordManagerDriver>> GetDrivers() const; base::WeakPtr<PasswordManagerDriver> GetDriver() const;
const autofill::PasswordForm* GetSubmittedForm() const; const autofill::PasswordForm* GetSubmittedForm() const;
#if defined(OS_IOS) #if defined(OS_IOS)
...@@ -354,11 +350,6 @@ class PasswordFormManager : public PasswordFormManagerForUI, ...@@ -354,11 +350,6 @@ class PasswordFormManager : public PasswordFormManagerForUI,
// Controls whether to wait or not server before filling. It is used in tests. // Controls whether to wait or not server before filling. It is used in tests.
static bool wait_for_server_predictions_for_filling_; 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. // Time when stored credentials are received from the store. Used for metrics.
base::TimeTicks received_stored_credentials_time_; base::TimeTicks received_stored_credentials_time_;
......
...@@ -348,10 +348,8 @@ void PasswordManager::UpdateFormManagers() { ...@@ -348,10 +348,8 @@ void PasswordManager::UpdateFormManagers() {
std::vector<PasswordManagerDriver*> drivers; std::vector<PasswordManagerDriver*> drivers;
for (PasswordFormManager* form_manager : form_managers) { for (PasswordFormManager* form_manager : form_managers) {
fetchers.push_back(form_manager->GetFormFetcher()); fetchers.push_back(form_manager->GetFormFetcher());
for (const auto& driver : form_manager->GetDrivers()) { if (form_manager->GetDriver())
if (driver) drivers.push_back(form_manager->GetDriver().get());
drivers.push_back(driver.get());
}
} }
// Remove the duplicates. // Remove the duplicates.
...@@ -570,10 +568,8 @@ void PasswordManager::CreateFormManagers( ...@@ -570,10 +568,8 @@ void PasswordManager::CreateFormManagers(
} }
// Create form manager for new forms. // Create form manager for new forms.
for (const PasswordForm* new_form : new_forms) { for (const PasswordForm* new_form : new_forms)
auto* manager = CreateFormManager(driver, new_form->form_data); CreateFormManager(driver, new_form->form_data);
manager->set_old_parsing_result(*new_form);
}
} }
PasswordFormManager* PasswordManager::CreateFormManager( 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