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

Side by Side Diff: components/password_manager/content/renderer/credential_manager_client.cc

Issue 1163493003: Credential Management: Reorder Web*Credential arguments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "components/password_manager/content/renderer/credential_manager_client .h" 5 #include "components/password_manager/content/renderer/credential_manager_client .h"
6 6
7 #include "components/password_manager/content/common/credential_manager_content_ utils.h" 7 #include "components/password_manager/content/common/credential_manager_content_ utils.h"
8 #include "components/password_manager/content/common/credential_manager_messages .h" 8 #include "components/password_manager/content/common/credential_manager_messages .h"
9 #include "components/password_manager/core/common/credential_manager_types.h" 9 #include "components/password_manager/core/common/credential_manager_types.h"
10 #include "content/public/renderer/render_view.h" 10 #include "content/public/renderer/render_view.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 } 78 }
79 79
80 void CredentialManagerClient::OnSendCredential(int request_id, 80 void CredentialManagerClient::OnSendCredential(int request_id,
81 const CredentialInfo& info) { 81 const CredentialInfo& info) {
82 RequestCallbacks* callbacks = request_callbacks_.Lookup(request_id); 82 RequestCallbacks* callbacks = request_callbacks_.Lookup(request_id);
83 DCHECK(callbacks); 83 DCHECK(callbacks);
84 scoped_ptr<blink::WebCredential> credential = nullptr; 84 scoped_ptr<blink::WebCredential> credential = nullptr;
85 switch (info.type) { 85 switch (info.type) {
86 case CredentialType::CREDENTIAL_TYPE_FEDERATED: 86 case CredentialType::CREDENTIAL_TYPE_FEDERATED:
87 credential.reset(new blink::WebFederatedCredential( 87 credential.reset(new blink::WebFederatedCredential(
88 info.id, info.name, info.avatar, info.federation)); 88 info.id, info.federation, info.name, info.avatar));
89 break; 89 break;
90 case CredentialType::CREDENTIAL_TYPE_LOCAL: 90 case CredentialType::CREDENTIAL_TYPE_LOCAL:
91 credential.reset(new blink::WebLocalCredential( 91 credential.reset(new blink::WebLocalCredential(
92 info.id, info.name, info.avatar, info.password)); 92 info.id, info.password, info.name, info.avatar));
93 break; 93 break;
94 case CredentialType::CREDENTIAL_TYPE_EMPTY: 94 case CredentialType::CREDENTIAL_TYPE_EMPTY:
95 // Intentionally empty; we'll send nullptr to the onSuccess call below. 95 // Intentionally empty; we'll send nullptr to the onSuccess call below.
96 break; 96 break;
97 } 97 }
98 callbacks->onSuccess(credential.get()); 98 callbacks->onSuccess(credential.get());
99 request_callbacks_.Remove(request_id); 99 request_callbacks_.Remove(request_id);
100 } 100 }
101 101
102 void CredentialManagerClient::OnRejectCredentialRequest( 102 void CredentialManagerClient::OnRejectCredentialRequest(
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 int request_id, 153 int request_id,
154 CredentialManagerClient::NotificationCallbacksMap* map) { 154 CredentialManagerClient::NotificationCallbacksMap* map) {
155 blink::WebCredentialManagerClient::NotificationCallbacks* callbacks = 155 blink::WebCredentialManagerClient::NotificationCallbacks* callbacks =
156 map->Lookup(request_id); 156 map->Lookup(request_id);
157 DCHECK(callbacks); 157 DCHECK(callbacks);
158 callbacks->onSuccess(); 158 callbacks->onSuccess();
159 map->Remove(request_id); 159 map->Remove(request_id);
160 } 160 }
161 161
162 } // namespace password_manager 162 } // namespace password_manager
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698