Commit 78112dae authored by vasilii's avatar vasilii Committed by Commit Bot

Get rid of NewPasswordFormManager::generation_element_.

The element is already stored in the votes uploader.

Bug: 936011
Change-Id: I655ea64547ced1deaad9c510494e0f444e9e7fbf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1627371Reviewed-by: default avatarVadym Doroshenko <dvadym@chromium.org>
Commit-Queue: Vasilii Sukhanov <vasilii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662633}
parent 75ab376c
...@@ -479,7 +479,6 @@ void NewPasswordFormManager::PresaveGeneratedPassword( ...@@ -479,7 +479,6 @@ void NewPasswordFormManager::PresaveGeneratedPassword(
observed_form_ = form; observed_form_ = form;
PresaveGeneratedPasswordInternal(form, generated_password); PresaveGeneratedPasswordInternal(form, generated_password);
votes_uploader_.set_generation_element(generation_element); votes_uploader_.set_generation_element(generation_element);
generation_element_ = generation_element;
} }
bool NewPasswordFormManager::UpdateGeneratedPasswordOnUserInput( bool NewPasswordFormManager::UpdateGeneratedPasswordOnUserInput(
...@@ -497,7 +496,7 @@ bool NewPasswordFormManager::UpdateGeneratedPasswordOnUserInput( ...@@ -497,7 +496,7 @@ bool NewPasswordFormManager::UpdateGeneratedPasswordOnUserInput(
} }
} }
base::string16 generated_password = generation_state_->generated_password(); base::string16 generated_password = generation_state_->generated_password();
if (generation_element_ == field_identifier) { if (votes_uploader_.get_generation_element() == field_identifier) {
generated_password = field_value; generated_password = field_value;
form_data_changed = true; form_data_changed = true;
} }
......
...@@ -350,13 +350,6 @@ class NewPasswordFormManager : public PasswordFormManagerInterface, ...@@ -350,13 +350,6 @@ class NewPasswordFormManager : public PasswordFormManagerInterface,
// dependencies on it. // dependencies on it.
bool is_new_login_ = true; bool is_new_login_ = true;
#if defined(OS_IOS)
// Contains a generated password, empty if no password generation happened or
// a generated password removed by the user.
// TODO(crbug/936011): move to |generation_state_|.
base::string16 generation_element_;
#endif
// Handles the user flows related to the generation. // Handles the user flows related to the generation.
std::unique_ptr<PasswordGenerationState> generation_state_; std::unique_ptr<PasswordGenerationState> generation_state_;
......
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