Chromium Code Reviews| Index: chrome/browser/ui/passwords/password_manager_presenter.h |
| diff --git a/chrome/browser/ui/passwords/password_manager_presenter.h b/chrome/browser/ui/passwords/password_manager_presenter.h |
| index 0096cdf25eb16d730d1b4ca4c0c4fa0272d23dc7..c674b6829620cb6f71c4b0699ee4c5306aed8a0a 100644 |
| --- a/chrome/browser/ui/passwords/password_manager_presenter.h |
| +++ b/chrome/browser/ui/passwords/password_manager_presenter.h |
| @@ -7,6 +7,7 @@ |
| #include <stddef.h> |
| +#include <map> |
| #include <string> |
| #include <vector> |
| @@ -21,6 +22,10 @@ namespace autofill { |
| struct PasswordForm; |
| } |
| +// Multimap from sort key to password forms. |
| +using DuplicatesMap = |
| + std::multimap<std::string, scoped_ptr<autofill::PasswordForm>>; |
| + |
| class PasswordUIView; |
| class Profile; |
| @@ -72,6 +77,18 @@ class PasswordManagerPresenter |
| void SetPasswordList(); |
| void SetPasswordExceptionList(); |
| + // Sort entries of |list| based on sort key. The key is the concatenation of |
| + // origin, entry type (non-Android credential, Android w/ affiliated web realm |
| + // or Android w/o affiliated web realm). If |username_and_password_in_key|, |
| + // username and hashed password are also included in sort key. If there is |
|
vabr (Chromium)
2016/03/09 10:00:11
Please update the comment to not mention hashing a
kolos1
2016/03/09 13:34:55
Done.
|
| + // several forms with the same key, all such forms but the first one are |
| + // stored in |duplicates| instead of |list|. |
| + void SortEntriesAndHideDuplicates( |
| + const std::string& languages, |
| + std::vector<scoped_ptr<autofill::PasswordForm>>* list, |
| + DuplicatesMap* duplicates, |
| + bool username_and_password_in_key); |
| + |
| // A short class to mediate requests to the password store. |
| class ListPopulater : public password_manager::PasswordStoreConsumer { |
| public: |
| @@ -117,6 +134,8 @@ class PasswordManagerPresenter |
| std::vector<scoped_ptr<autofill::PasswordForm>> password_list_; |
| std::vector<scoped_ptr<autofill::PasswordForm>> password_exception_list_; |
| + DuplicatesMap password_duplicates_; |
| + DuplicatesMap password_exception_duplicates_; |
| // Whether to show stored passwords or not. |
| BooleanPrefMember show_passwords_; |