Commit e6c54408 authored by dvadym's avatar dvadym Committed by Commit bot

Rename provisionally_saved_form -> submitted_form.

In PasswordFormManager provisionally_saved_form is actually submitted form and it's very unclear from variable name.

BUG=None

Review-Url: https://codereview.chromium.org/2605003003
Cr-Commit-Position: refs/heads/master@{#440855}
parent d4e617ae
...@@ -177,8 +177,8 @@ class PasswordFormManager : public FormFetcher::Consumer { ...@@ -177,8 +177,8 @@ class PasswordFormManager : public FormFetcher::Consumer {
void MarkGenerationAvailable() { generation_available_ = true; } void MarkGenerationAvailable() { generation_available_ = true; }
// Returns the provisionally saved form, if it exists, otherwise nullptr. // Returns the provisionally saved form, if it exists, otherwise nullptr.
const autofill::PasswordForm* provisionally_saved_form() const { const autofill::PasswordForm* submitted_form() const {
return provisionally_saved_form_.get(); return submitted_form_.get();
} }
// Returns the pending credentials. // Returns the pending credentials.
...@@ -470,7 +470,7 @@ class PasswordFormManager : public FormFetcher::Consumer { ...@@ -470,7 +470,7 @@ class PasswordFormManager : public FormFetcher::Consumer {
const autofill::PasswordForm observed_form_; const autofill::PasswordForm observed_form_;
// Stores a submitted form. // Stores a submitted form.
std::unique_ptr<const autofill::PasswordForm> provisionally_saved_form_; std::unique_ptr<const autofill::PasswordForm> submitted_form_;
// Stores if for creating |pending_credentials_| other possible usernames // Stores if for creating |pending_credentials_| other possible usernames
// option should apply. // option should apply.
...@@ -483,7 +483,7 @@ class PasswordFormManager : public FormFetcher::Consumer { ...@@ -483,7 +483,7 @@ class PasswordFormManager : public FormFetcher::Consumer {
// Stores updated credentials when the form was submitted but success is still // Stores updated credentials when the form was submitted but success is still
// unknown. This variable contains credentials that are ready to be written // unknown. This variable contains credentials that are ready to be written
// (saved or updated) to a password store. It is calculated based on // (saved or updated) to a password store. It is calculated based on
// |provisionally_saved_form_| and |best_matches_|. // |submitted_form_| and |best_matches_|.
autofill::PasswordForm pending_credentials_; autofill::PasswordForm pending_credentials_;
// Whether pending_credentials_ stores a new login or is an update // Whether pending_credentials_ stores a new login or is an update
...@@ -541,7 +541,7 @@ class PasswordFormManager : public FormFetcher::Consumer { ...@@ -541,7 +541,7 @@ class PasswordFormManager : public FormFetcher::Consumer {
// |observed_form_| but also on the credentials that the user submitted. // |observed_form_| but also on the credentials that the user submitted.
bool is_possible_change_password_form_without_username_; bool is_possible_change_password_form_without_username_;
// True if |provisionally_saved_form_| looks like SignUp form according to // True if |submitted_form_| looks like SignUp form according to
// local heuristics. // local heuristics.
bool does_look_like_signup_form_ = false; bool does_look_like_signup_form_ = false;
......
...@@ -333,11 +333,11 @@ void PasswordManager::ProvisionallySavePassword(const PasswordForm& form) { ...@@ -333,11 +333,11 @@ void PasswordManager::ProvisionallySavePassword(const PasswordForm& form) {
manager.swap(*matched_manager_it); manager.swap(*matched_manager_it);
pending_login_managers_.erase(matched_manager_it); pending_login_managers_.erase(matched_manager_it);
PasswordForm provisionally_saved_form(form); PasswordForm submitted_form(form);
provisionally_saved_form.preferred = true; submitted_form.preferred = true;
if (logger) { if (logger) {
logger->LogPasswordForm(Logger::STRING_PROVISIONALLY_SAVED_FORM, logger->LogPasswordForm(Logger::STRING_PROVISIONALLY_SAVED_FORM,
provisionally_saved_form); submitted_form);
} }
PasswordFormManager::OtherPossibleUsernamesAction action = PasswordFormManager::OtherPossibleUsernamesAction action =
PasswordFormManager::IGNORE_OTHER_POSSIBLE_USERNAMES; PasswordFormManager::IGNORE_OTHER_POSSIBLE_USERNAMES;
...@@ -348,7 +348,7 @@ void PasswordManager::ProvisionallySavePassword(const PasswordForm& form) { ...@@ -348,7 +348,7 @@ void PasswordManager::ProvisionallySavePassword(const PasswordForm& form) {
Logger::STRING_IGNORE_POSSIBLE_USERNAMES, Logger::STRING_IGNORE_POSSIBLE_USERNAMES,
action == PasswordFormManager::IGNORE_OTHER_POSSIBLE_USERNAMES); action == PasswordFormManager::IGNORE_OTHER_POSSIBLE_USERNAMES);
} }
manager->ProvisionallySave(provisionally_saved_form, action); manager->ProvisionallySave(submitted_form, action);
provisional_save_manager_.swap(manager); provisional_save_manager_.swap(manager);
// Cache the user-visible URL (i.e., the one seen in the omnibox). Once the // Cache the user-visible URL (i.e., the one seen in the omnibox). Once the
...@@ -678,9 +678,9 @@ void PasswordManager::OnLoginSuccessful() { ...@@ -678,9 +678,9 @@ void PasswordManager::OnLoginSuccessful() {
*provisional_save_manager_); *provisional_save_manager_);
if (base::FeatureList::IsEnabled(features::kDropSyncCredential)) { if (base::FeatureList::IsEnabled(features::kDropSyncCredential)) {
DCHECK(provisional_save_manager_->provisionally_saved_form()); DCHECK(provisional_save_manager_->submitted_form());
if (!client_->GetStoreResultFilter()->ShouldSave( if (!client_->GetStoreResultFilter()->ShouldSave(
*provisional_save_manager_->provisionally_saved_form())) { *provisional_save_manager_->submitted_form())) {
provisional_save_manager_->WipeStoreCopyIfOutdated(); provisional_save_manager_->WipeStoreCopyIfOutdated();
RecordFailure(SYNC_CREDENTIAL, RecordFailure(SYNC_CREDENTIAL,
provisional_save_manager_->observed_form().origin, provisional_save_manager_->observed_form().origin,
......
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