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

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

Issue 1970203002: [Smart Lock] Remove misleading dcheck from AccountChooser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 } 220 }
221 221
222 void AccountChooserDialogAndroid::ChooseCredential( 222 void AccountChooserDialogAndroid::ChooseCredential(
223 size_t index, 223 size_t index,
224 password_manager::CredentialType type) { 224 password_manager::CredentialType type) {
225 using namespace password_manager; 225 using namespace password_manager;
226 if (type == CredentialType::CREDENTIAL_TYPE_EMPTY) { 226 if (type == CredentialType::CREDENTIAL_TYPE_EMPTY) {
227 passwords_data_.ChooseCredential(nullptr); 227 passwords_data_.ChooseCredential(nullptr);
228 return; 228 return;
229 } 229 }
230 DCHECK_EQ(CredentialType::CREDENTIAL_TYPE_PASSWORD, type);
231 const auto& credentials_forms = 230 const auto& credentials_forms =
232 (type == CredentialType::CREDENTIAL_TYPE_PASSWORD) 231 (type == CredentialType::CREDENTIAL_TYPE_PASSWORD)
233 ? local_credentials_forms() 232 ? local_credentials_forms()
234 : federated_credentials_forms(); 233 : federated_credentials_forms();
235 if (index < credentials_forms.size()) { 234 if (index < credentials_forms.size()) {
236 passwords_data_.ChooseCredential(credentials_forms[index]); 235 passwords_data_.ChooseCredential(credentials_forms[index]);
237 } 236 }
238 } 237 }
239 238
240 bool RegisterAccountChooserDialogAndroid(JNIEnv* env) { 239 bool RegisterAccountChooserDialogAndroid(JNIEnv* env) {
241 return RegisterNativesImpl(env); 240 return RegisterNativesImpl(env);
242 } 241 }
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