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

Unified Diff: chrome/browser/ui/passwords/manage_passwords_ui_controller.h

Issue 848723002: Credential Manager API: Showing both local and federated logins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adressed comments. Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/passwords/manage_passwords_ui_controller.h
diff --git a/chrome/browser/ui/passwords/manage_passwords_ui_controller.h b/chrome/browser/ui/passwords/manage_passwords_ui_controller.h
index 5a1838e20073936b25a9ff88a0fc35e7f22e60a7..8397b803d3a26b5d9936ae24db560c2dce0cc7fe 100644
--- a/chrome/browser/ui/passwords/manage_passwords_ui_controller.h
+++ b/chrome/browser/ui/passwords/manage_passwords_ui_controller.h
@@ -18,6 +18,7 @@ class WebContents;
}
namespace password_manager {
+enum class CredentialType : unsigned int;
vasilii 2015/01/16 14:07:26 I wonder why the type is inherited from "unsigned
melandory 2015/01/19 15:40:15 Yes, we can amend unsigned int and live with defau
struct CredentialInfo;
class PasswordFormManager;
}
@@ -80,8 +81,9 @@ class ManagePasswordsUIController
// Called from the model when the user chooses a credential.
// The controller MUST be in a pending credentials state.
- virtual void ChooseCredential(bool was_chosen,
- const autofill::PasswordForm& form);
+ virtual void ChooseCredential(
+ const autofill::PasswordForm& form,
+ password_manager::CredentialType credential_type);
// Called from the model when the user chooses to never save passwords; passes
// the action off to the FormManager. The controller MUST be in a pending
@@ -107,8 +109,12 @@ class ManagePasswordsUIController
password_manager::ui::State state() const { return state_; }
- ScopedVector<autofill::PasswordForm>& new_password_forms() {
- return new_password_forms_;
+ ScopedVector<autofill::PasswordForm>& federated_credentials_forms() {
+ return federated_credentials_forms_;
+ }
+
+ ScopedVector<autofill::PasswordForm>& local_credentials_forms() {
+ return local_credentials_forms_;
}
// True if a password is sitting around, waiting for a user to decide whether
@@ -154,6 +160,14 @@ class ManagePasswordsUIController
// |password_form_map_| is to be cleared too.
ScopedVector<autofill::PasswordForm> new_password_forms_;
+ // Federated credentials. Stores federated credentials which will be shown
+ // when Credential Management API was used.
+ ScopedVector<autofill::PasswordForm> federated_credentials_forms_;
+
+ // Local credentials. Stores local credentials which will be shown
+ // when Credential Management API was used.
+ ScopedVector<autofill::PasswordForm> local_credentials_forms_;
+
// All previously stored credentials for a specific site.
// Protected, not private, so we can mess with the value in
// ManagePasswordsUIControllerMock.

Powered by Google App Engine
This is Rietveld 408576698