| 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/core/common/password_form_fill_data.h" | 5 #include "components/autofill/core/common/password_form_fill_data.h" |
| 6 | 6 |
| 7 #include <tuple> | 7 #include <tuple> |
| 8 | 8 |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "components/autofill/core/common/form_field_data.h" | 10 #include "components/autofill/core/common/form_field_data.h" |
| 11 | 11 |
| 12 namespace autofill { | 12 namespace autofill { |
| 13 | 13 |
| 14 UsernamesCollectionKey::UsernamesCollectionKey() {} | 14 UsernamesCollectionKey::UsernamesCollectionKey() {} |
| 15 | 15 |
| 16 UsernamesCollectionKey::~UsernamesCollectionKey() {} | 16 UsernamesCollectionKey::~UsernamesCollectionKey() {} |
| 17 | 17 |
| 18 bool UsernamesCollectionKey::operator<( | 18 bool UsernamesCollectionKey::operator<( |
| 19 const UsernamesCollectionKey& other) const { | 19 const UsernamesCollectionKey& other) const { |
| 20 return std::tie(username, password, realm) < | 20 return std::tie(username, password, realm) < |
| 21 std::tie(other.username, other.password, other.realm); | 21 std::tie(other.username, other.password, other.realm); |
| 22 } | 22 } |
| 23 | 23 |
| 24 PasswordFormFillData::PasswordFormFillData() | 24 PasswordFormFillData::PasswordFormFillData() |
| 25 : wait_for_username(false), | 25 : wait_for_username(false), |
| 26 is_possible_change_password_form(false) { | 26 is_possible_change_password_form(false) { |
| 27 } | 27 } |
| 28 | 28 |
| 29 PasswordFormFillData::PasswordFormFillData(const PasswordFormFillData& other) = |
| 30 default; |
| 31 |
| 29 PasswordFormFillData::~PasswordFormFillData() { | 32 PasswordFormFillData::~PasswordFormFillData() { |
| 30 } | 33 } |
| 31 | 34 |
| 32 void InitPasswordFormFillData( | 35 void InitPasswordFormFillData( |
| 33 const PasswordForm& form_on_page, | 36 const PasswordForm& form_on_page, |
| 34 const PasswordFormMap& matches, | 37 const PasswordFormMap& matches, |
| 35 const PasswordForm* const preferred_match, | 38 const PasswordForm* const preferred_match, |
| 36 bool wait_for_username_before_autofill, | 39 bool wait_for_username_before_autofill, |
| 37 bool enable_other_possible_usernames, | 40 bool enable_other_possible_usernames, |
| 38 PasswordFormFillData* result) { | 41 PasswordFormFillData* result) { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 if (it.second->is_public_suffix_match || | 86 if (it.second->is_public_suffix_match || |
| 84 it.second->is_affiliation_based_match) | 87 it.second->is_affiliation_based_match) |
| 85 key.realm = it.second->signon_realm; | 88 key.realm = it.second->signon_realm; |
| 86 result->other_possible_usernames[key] = | 89 result->other_possible_usernames[key] = |
| 87 it.second->other_possible_usernames; | 90 it.second->other_possible_usernames; |
| 88 } | 91 } |
| 89 } | 92 } |
| 90 } | 93 } |
| 91 | 94 |
| 92 } // namespace autofill | 95 } // namespace autofill |
| OLD | NEW |