| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/password_autofill_agent.h" | 5 #include "components/autofill/content/renderer/password_autofill_agent.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1102 if (!password->suggestedValue().isEmpty()) { | 1102 if (!password->suggestedValue().isEmpty()) { |
| 1103 password->setSuggestedValue(blink::WebString()); | 1103 password->setSuggestedValue(blink::WebString()); |
| 1104 password->setAutofilled(was_password_autofilled_); | 1104 password->setAutofilled(was_password_autofilled_); |
| 1105 } | 1105 } |
| 1106 } | 1106 } |
| 1107 | 1107 |
| 1108 void PasswordAutofillAgent::ProvisionallySavePassword( | 1108 void PasswordAutofillAgent::ProvisionallySavePassword( |
| 1109 blink::WebLocalFrame* frame, | 1109 blink::WebLocalFrame* frame, |
| 1110 const blink::WebFormElement& form, | 1110 const blink::WebFormElement& form, |
| 1111 ProvisionallySaveRestriction restriction) { | 1111 ProvisionallySaveRestriction restriction) { |
| 1112 DCHECK(frame); |
| 1112 scoped_ptr<PasswordForm> password_form(CreatePasswordForm(form)); | 1113 scoped_ptr<PasswordForm> password_form(CreatePasswordForm(form)); |
| 1113 if (!password_form || (restriction == RESTRICTION_NON_EMPTY_PASSWORD && | 1114 if (!password_form || (restriction == RESTRICTION_NON_EMPTY_PASSWORD && |
| 1114 password_form->password_value.empty() && | 1115 password_form->password_value.empty() && |
| 1115 password_form->new_password_value.empty())) { | 1116 password_form->new_password_value.empty())) { |
| 1116 return; | 1117 return; |
| 1117 } | 1118 } |
| 1118 provisionally_saved_forms_[frame].reset(password_form.release()); | 1119 provisionally_saved_forms_[frame].reset(password_form.release()); |
| 1119 } | 1120 } |
| 1120 | 1121 |
| 1121 } // namespace autofill | 1122 } // namespace autofill |
| OLD | NEW |