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

Side by Side Diff: chrome/browser/ui/passwords/password_manager_presenter.h

Issue 866983003: GetLoginsRequest: Use ScopedVector to express ownership of forms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@324291_scopedvector
Patch Set: Rebased Created 5 years, 10 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
OLDNEW
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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 // A short class to mediate requests to the password store for passwordlist. 88 // A short class to mediate requests to the password store for passwordlist.
89 class PasswordListPopulater : public ListPopulater { 89 class PasswordListPopulater : public ListPopulater {
90 public: 90 public:
91 explicit PasswordListPopulater(PasswordManagerPresenter* page); 91 explicit PasswordListPopulater(PasswordManagerPresenter* page);
92 92
93 // Send a query to the password store to populate a password list. 93 // Send a query to the password store to populate a password list.
94 void Populate() override; 94 void Populate() override;
95 95
96 // Send the password store's reply back to the handler. 96 // Send the password store's reply back to the handler.
97 void OnGetPasswordStoreResults( 97 void OnGetPasswordStoreResults() override;
98 const std::vector<autofill::PasswordForm*>& results) override;
99 }; 98 };
100 99
101 // A short class to mediate requests to the password store for exceptions. 100 // A short class to mediate requests to the password store for exceptions.
102 class PasswordExceptionListPopulater : public ListPopulater { 101 class PasswordExceptionListPopulater : public ListPopulater {
103 public: 102 public:
104 explicit PasswordExceptionListPopulater(PasswordManagerPresenter* page); 103 explicit PasswordExceptionListPopulater(PasswordManagerPresenter* page);
105 104
106 // Send a query to the password store to populate a passwordException list. 105 // Send a query to the password store to populate a passwordException list.
107 void Populate() override; 106 void Populate() override;
108 107
109 // Send the password store's reply back to the handler. 108 // Send the password store's reply back to the handler.
110 void OnGetPasswordStoreResults( 109 void OnGetPasswordStoreResults() override;
111 const std::vector<autofill::PasswordForm*>& results) override;
112 }; 110 };
113 111
114 // Password store consumer for populating the password list and exceptions. 112 // Password store consumer for populating the password list and exceptions.
115 PasswordListPopulater populater_; 113 PasswordListPopulater populater_;
116 PasswordExceptionListPopulater exception_populater_; 114 PasswordExceptionListPopulater exception_populater_;
117 115
118 ScopedVector<autofill::PasswordForm> password_list_; 116 ScopedVector<autofill::PasswordForm> password_list_;
119 ScopedVector<autofill::PasswordForm> password_exception_list_; 117 ScopedVector<autofill::PasswordForm> password_exception_list_;
120 118
121 // Whether to show stored passwords or not. 119 // Whether to show stored passwords or not.
122 BooleanPrefMember show_passwords_; 120 BooleanPrefMember show_passwords_;
123 121
124 // Indicates whether or not the password manager should require the user to 122 // Indicates whether or not the password manager should require the user to
125 // reauthenticate before revealing plaintext passwords. 123 // reauthenticate before revealing plaintext passwords.
126 bool require_reauthentication_; 124 bool require_reauthentication_;
127 125
128 // The last time the user was successfully authenticated. 126 // The last time the user was successfully authenticated.
129 // Used to determine whether or not to reveal plaintext passwords. 127 // Used to determine whether or not to reveal plaintext passwords.
130 base::TimeTicks last_authentication_time_; 128 base::TimeTicks last_authentication_time_;
131 129
132 // UI view that owns this presenter. 130 // UI view that owns this presenter.
133 PasswordUIView* password_view_; 131 PasswordUIView* password_view_;
134 132
135 DISALLOW_COPY_AND_ASSIGN(PasswordManagerPresenter); 133 DISALLOW_COPY_AND_ASSIGN(PasswordManagerPresenter);
136 }; 134 };
137 135
138 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORD_MANAGER_PRESENTER_H_ 136 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORD_MANAGER_PRESENTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698