OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/autofill/content/renderer/provisionally_saved_password_form
.h" | 5 #include "components/autofill/content/renderer/provisionally_saved_password_form
.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "components/autofill/core/common/password_form.h" | 9 #include "components/autofill/core/common/password_form.h" |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 password_form_.reset(); | 27 password_form_.reset(); |
28 form_element_.reset(); | 28 form_element_.reset(); |
29 input_element_.reset(); | 29 input_element_.reset(); |
30 } | 30 } |
31 | 31 |
32 bool ProvisionallySavedPasswordForm::IsSet() const { | 32 bool ProvisionallySavedPasswordForm::IsSet() const { |
33 return static_cast<bool>(password_form_); | 33 return static_cast<bool>(password_form_); |
34 } | 34 } |
35 | 35 |
36 bool ProvisionallySavedPasswordForm::IsPasswordValid() const { | 36 bool ProvisionallySavedPasswordForm::IsPasswordValid() const { |
37 return IsSet() && !password_form_->username_value.empty() && | 37 return IsSet() && !(password_form_->password_value.empty() && |
38 !(password_form_->password_value.empty() && | 38 password_form_->new_password_value.empty()); |
39 password_form_->new_password_value.empty()); | |
40 } | 39 } |
41 | 40 |
42 } // namespace autofill | 41 } // namespace autofill |
OLD | NEW |