Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Side by Side Diff: components/autofill/content/renderer/provisionally_saved_password_form.cc

Issue 2772793002: Skip checking non-emptiness of username on In-Page Navigation. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698