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

Side by Side Diff: chrome/browser/password_manager/account_chooser_dialog_android.cc

Issue 1832933002: Update the |skip_zero_click| flag of a credential when selected in the account chooser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 8 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 | chrome/browser/password_manager/chrome_password_manager_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/password_manager/account_chooser_dialog_android.h" 5 #include "chrome/browser/password_manager/account_chooser_dialog_android.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 const std::vector<const autofill::PasswordForm*>& 199 const std::vector<const autofill::PasswordForm*>&
200 AccountChooserDialogAndroid::federated_credentials_forms() const { 200 AccountChooserDialogAndroid::federated_credentials_forms() const {
201 return passwords_data_.federated_credentials_forms(); 201 return passwords_data_.federated_credentials_forms();
202 } 202 }
203 203
204 void AccountChooserDialogAndroid::ChooseCredential( 204 void AccountChooserDialogAndroid::ChooseCredential(
205 size_t index, 205 size_t index,
206 password_manager::CredentialType type) { 206 password_manager::CredentialType type) {
207 using namespace password_manager; 207 using namespace password_manager;
208 if (type == CredentialType::CREDENTIAL_TYPE_EMPTY) { 208 if (type == CredentialType::CREDENTIAL_TYPE_EMPTY) {
209 passwords_data_.ChooseCredential(autofill::PasswordForm(), type); 209 passwords_data_.ChooseCredential(nullptr);
210 return; 210 return;
211 } 211 }
212 DCHECK(type == CredentialType::CREDENTIAL_TYPE_PASSWORD || 212 DCHECK_EQ(CredentialType::CREDENTIAL_TYPE_PASSWORD, type);
213 type == CredentialType::CREDENTIAL_TYPE_FEDERATED);
214 const auto& credentials_forms = 213 const auto& credentials_forms =
215 (type == CredentialType::CREDENTIAL_TYPE_PASSWORD) 214 (type == CredentialType::CREDENTIAL_TYPE_PASSWORD)
216 ? local_credentials_forms() 215 ? local_credentials_forms()
217 : federated_credentials_forms(); 216 : federated_credentials_forms();
218 if (index < credentials_forms.size()) { 217 if (index < credentials_forms.size()) {
219 passwords_data_.ChooseCredential(*credentials_forms[index], type); 218 passwords_data_.ChooseCredential(credentials_forms[index]);
220 } 219 }
221 } 220 }
222 221
223 bool RegisterAccountChooserDialogAndroid(JNIEnv* env) { 222 bool RegisterAccountChooserDialogAndroid(JNIEnv* env) {
224 return RegisterNativesImpl(env); 223 return RegisterNativesImpl(env);
225 } 224 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/password_manager/chrome_password_manager_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698