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

Unified Diff: components/password_manager/content/browser/content_credential_manager_dispatcher.cc

Issue 619033002: Revert of Credential Manager: Return the first valid item from the PasswordStore. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@yay
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | components/password_manager/content/browser/content_credential_manager_dispatcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/password_manager/content/browser/content_credential_manager_dispatcher.cc
diff --git a/components/password_manager/content/browser/content_credential_manager_dispatcher.cc b/components/password_manager/content/browser/content_credential_manager_dispatcher.cc
index 4f88040ae999795860bfe46318b1897fd845cde2..be8a06cd46ffac8510fe509845c05145dbf7ef5c 100644
--- a/components/password_manager/content/browser/content_credential_manager_dispatcher.cc
+++ b/components/password_manager/content/browser/content_credential_manager_dispatcher.cc
@@ -46,7 +46,8 @@
}
void ContentCredentialManagerDispatcher::OnNotifyFailedSignIn(
- int request_id, const CredentialInfo&) {
+ int request_id,
+ const password_manager::CredentialInfo&) {
// TODO(mkwst): This is a stub.
web_contents()->GetRenderViewHost()->Send(
new CredentialManagerMsg_AcknowledgeFailedSignIn(
@@ -54,7 +55,8 @@
}
void ContentCredentialManagerDispatcher::OnNotifySignedIn(
- int request_id, const CredentialInfo&) {
+ int request_id,
+ const password_manager::CredentialInfo&) {
// TODO(mkwst): This is a stub.
web_contents()->GetRenderViewHost()->Send(
new CredentialManagerMsg_AcknowledgeSignedIn(
@@ -95,22 +97,11 @@
const std::vector<autofill::PasswordForm*>& results) {
DCHECK(pending_request_id_);
- if (results.empty()) {
- // TODO(mkwst): This should be a separate message from above in
- // OnRequestCredential. Waiting on a Blink-side change to make that
- // possible.
- web_contents()->GetRenderViewHost()->Send(
- new CredentialManagerMsg_RejectCredentialRequest(
- web_contents()->GetRenderViewHost()->GetRoutingID(),
- pending_request_id_));
- return;
- }
-
- // TODO(mkwst): This is a stub. We're just grabbing the first result and
- // piping it down into Blink. Really, we should be kicking off some sort
- // of UI full of magic moments and delight. Also, we should deal with
- // federated login types.
- CredentialInfo info(*results[0]);
+ // TODO(mkwst): This is a stub. We should be looking at |results| here. Baby
+ // steps.
+ password_manager::CredentialInfo info(base::ASCIIToUTF16("id"),
+ base::ASCIIToUTF16("name"),
+ GURL("https://example.com/image.png"));
web_contents()->GetRenderViewHost()->Send(
new CredentialManagerMsg_SendCredential(
web_contents()->GetRenderViewHost()->GetRoutingID(),
« no previous file with comments | « no previous file | components/password_manager/content/browser/content_credential_manager_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698