| 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 #ifndef COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ |
| 6 #define COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ | 6 #define COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 ~PasswordForm(); | 286 ~PasswordForm(); |
| 287 }; | 287 }; |
| 288 | 288 |
| 289 // True if the unique keys for the forms are the same. The unique key is | 289 // True if the unique keys for the forms are the same. The unique key is |
| 290 // (origin, username_element, username_value, password_element, signon_realm). | 290 // (origin, username_element, username_value, password_element, signon_realm). |
| 291 bool ArePasswordFormUniqueKeyEqual(const PasswordForm& left, | 291 bool ArePasswordFormUniqueKeyEqual(const PasswordForm& left, |
| 292 const PasswordForm& right); | 292 const PasswordForm& right); |
| 293 | 293 |
| 294 // A comparator for the unique key. | 294 // A comparator for the unique key. |
| 295 struct LessThanUniqueKey { | 295 struct LessThanUniqueKey { |
| 296 bool operator()(const PasswordForm* left, const PasswordForm* right) const; | 296 bool operator()(const std::unique_ptr<PasswordForm>& left, |
| 297 const std::unique_ptr<PasswordForm>& right) const; |
| 297 }; | 298 }; |
| 298 | 299 |
| 299 // For testing. | 300 // For testing. |
| 300 std::ostream& operator<<(std::ostream& os, PasswordForm::Layout layout); | 301 std::ostream& operator<<(std::ostream& os, PasswordForm::Layout layout); |
| 301 std::ostream& operator<<(std::ostream& os, const PasswordForm& form); | 302 std::ostream& operator<<(std::ostream& os, const PasswordForm& form); |
| 302 std::ostream& operator<<(std::ostream& os, PasswordForm* form); | 303 std::ostream& operator<<(std::ostream& os, PasswordForm* form); |
| 303 | 304 |
| 304 } // namespace autofill | 305 } // namespace autofill |
| 305 | 306 |
| 306 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ | 307 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ |
| OLD | NEW |