| 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 CHROME_BROWSER_UI_PASSWORDS_PASSWORD_MANAGER_PRESENTER_H_ | 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_PASSWORD_MANAGER_PRESENTER_H_ |
| 6 #define CHROME_BROWSER_UI_PASSWORDS_PASSWORD_MANAGER_PRESENTER_H_ | 6 #define CHROME_BROWSER_UI_PASSWORDS_PASSWORD_MANAGER_PRESENTER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 void SetPasswordList(); | 77 void SetPasswordList(); |
| 78 void SetPasswordExceptionList(); | 78 void SetPasswordExceptionList(); |
| 79 | 79 |
| 80 // Sort entries of |list| based on sort key. The key is the concatenation of | 80 // Sort entries of |list| based on sort key. The key is the concatenation of |
| 81 // origin, entry type (non-Android credential, Android w/ affiliated web realm | 81 // origin, entry type (non-Android credential, Android w/ affiliated web realm |
| 82 // or Android w/o affiliated web realm). If |username_and_password_in_key|, | 82 // or Android w/o affiliated web realm). If |username_and_password_in_key|, |
| 83 // username and password are also included in sort key. If there are several | 83 // username and password are also included in sort key. If there are several |
| 84 // forms with the same key, all such forms but the first one are | 84 // forms with the same key, all such forms but the first one are |
| 85 // stored in |duplicates| instead of |list|. | 85 // stored in |duplicates| instead of |list|. |
| 86 void SortEntriesAndHideDuplicates( | 86 void SortEntriesAndHideDuplicates( |
| 87 const std::string& languages, | |
| 88 std::vector<scoped_ptr<autofill::PasswordForm>>* list, | 87 std::vector<scoped_ptr<autofill::PasswordForm>>* list, |
| 89 DuplicatesMap* duplicates, | 88 DuplicatesMap* duplicates, |
| 90 bool username_and_password_in_key); | 89 bool username_and_password_in_key); |
| 91 | 90 |
| 92 // A short class to mediate requests to the password store. | 91 // A short class to mediate requests to the password store. |
| 93 class ListPopulater : public password_manager::PasswordStoreConsumer { | 92 class ListPopulater : public password_manager::PasswordStoreConsumer { |
| 94 public: | 93 public: |
| 95 explicit ListPopulater(PasswordManagerPresenter* page); | 94 explicit ListPopulater(PasswordManagerPresenter* page); |
| 96 ~ListPopulater() override; | 95 ~ListPopulater() override; |
| 97 | 96 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 DuplicatesMap password_duplicates_; | 136 DuplicatesMap password_duplicates_; |
| 138 DuplicatesMap password_exception_duplicates_; | 137 DuplicatesMap password_exception_duplicates_; |
| 139 | 138 |
| 140 // The last time the user was successfully authenticated. | 139 // The last time the user was successfully authenticated. |
| 141 // Used to determine whether or not to reveal plaintext passwords. | 140 // Used to determine whether or not to reveal plaintext passwords. |
| 142 base::TimeTicks last_authentication_time_; | 141 base::TimeTicks last_authentication_time_; |
| 143 | 142 |
| 144 // UI view that owns this presenter. | 143 // UI view that owns this presenter. |
| 145 PasswordUIView* password_view_; | 144 PasswordUIView* password_view_; |
| 146 | 145 |
| 147 // User pref for storing accept languages. | |
| 148 std::string languages_; | |
| 149 | |
| 150 DISALLOW_COPY_AND_ASSIGN(PasswordManagerPresenter); | 146 DISALLOW_COPY_AND_ASSIGN(PasswordManagerPresenter); |
| 151 }; | 147 }; |
| 152 | 148 |
| 153 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORD_MANAGER_PRESENTER_H_ | 149 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORD_MANAGER_PRESENTER_H_ |
| OLD | NEW |