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

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

Issue 2746033004: Add password form search using blink::WebNode reference comparison. (Closed)
Patch Set: Rename ProvisionallySavedForm to ProvisionallySavedPasswordForm. 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
« no previous file with comments | « components/autofill/content/renderer/provisionally_saved_password_form.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "components/autofill/content/renderer/provisionally_saved_password_form .h"
6
7 #include <utility>
8
9 #include "components/autofill/core/common/password_form.h"
10
11 namespace autofill {
12
13 ProvisionallySavedPasswordForm::ProvisionallySavedPasswordForm() = default;
14
15 ProvisionallySavedPasswordForm::~ProvisionallySavedPasswordForm() = default;
16
17 void ProvisionallySavedPasswordForm::Set(
18 std::unique_ptr<PasswordForm> password_form,
19 const blink::WebFormElement& form_element,
20 const blink::WebInputElement& input_element) {
21 password_form_ = std::move(password_form);
22 form_element_ = form_element;
23 input_element_ = input_element;
24 }
25
26 void ProvisionallySavedPasswordForm::Reset() {
27 password_form_.reset();
28 form_element_.reset();
29 input_element_.reset();
30 }
31
32 bool ProvisionallySavedPasswordForm::IsSet() const {
33 return static_cast<bool>(password_form_);
34 }
35
36 bool ProvisionallySavedPasswordForm::IsPasswordValid() const {
37 return IsSet() && !password_form_->username_value.empty() &&
38 !(password_form_->password_value.empty() &&
39 password_form_->new_password_value.empty());
40 }
41
42 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/content/renderer/provisionally_saved_password_form.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698