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

Side by Side Diff: chrome/browser/ui/android/infobars/account_chooser_infobar.cc

Issue 1162583003: Credential Management: Rename 'LocalCredential' to 'PasswordCredential' (2/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@drop
Patch Set: Fix. 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
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/ui/android/infobars/account_chooser_infobar.h" 5 #include "chrome/browser/ui/android/infobars/account_chooser_infobar.h"
6 6
7 #include "base/android/scoped_java_ref.h" 7 #include "base/android/scoped_java_ref.h"
8 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher.h" 8 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher.h"
9 #include "chrome/browser/infobars/infobar_service.h" 9 #include "chrome/browser/infobars/infobar_service.h"
10 #include "chrome/browser/password_manager/account_chooser_infobar_delegate_andro id.h" 10 #include "chrome/browser/password_manager/account_chooser_infobar_delegate_andro id.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 base::android::ScopedJavaLocalRef<jobject> 101 base::android::ScopedJavaLocalRef<jobject>
102 AccountChooserInfoBar::CreateRenderInfoBar(JNIEnv* env) { 102 AccountChooserInfoBar::CreateRenderInfoBar(JNIEnv* env) {
103 size_t credential_array_size = 103 size_t credential_array_size =
104 GetDelegate()->local_credentials_forms().size() + 104 GetDelegate()->local_credentials_forms().size() +
105 GetDelegate()->federated_credentials_forms().size(); 105 GetDelegate()->federated_credentials_forms().size();
106 ScopedJavaLocalRef<jobjectArray> java_credentials_array = 106 ScopedJavaLocalRef<jobjectArray> java_credentials_array =
107 CreateNativeCredentialArray(env, credential_array_size); 107 CreateNativeCredentialArray(env, credential_array_size);
108 AddElementsToJavaCredentialArray( 108 AddElementsToJavaCredentialArray(
109 env, java_credentials_array, GetDelegate()->local_credentials_forms(), 109 env, java_credentials_array, GetDelegate()->local_credentials_forms(),
110 password_manager::CredentialType::CREDENTIAL_TYPE_LOCAL); 110 password_manager::CredentialType::CREDENTIAL_TYPE_PASSWORD);
111 AddElementsToJavaCredentialArray( 111 AddElementsToJavaCredentialArray(
112 env, java_credentials_array, GetDelegate()->federated_credentials_forms(), 112 env, java_credentials_array, GetDelegate()->federated_credentials_forms(),
113 password_manager::CredentialType::CREDENTIAL_TYPE_FEDERATED, 113 password_manager::CredentialType::CREDENTIAL_TYPE_FEDERATED,
114 GetDelegate()->local_credentials_forms().size()); 114 GetDelegate()->local_credentials_forms().size());
115 base::android::ScopedJavaGlobalRef<jobject> java_infobar_global; 115 base::android::ScopedJavaGlobalRef<jobject> java_infobar_global;
116 java_infobar_global.Reset(Java_AccountChooserInfoBar_show( 116 java_infobar_global.Reset(Java_AccountChooserInfoBar_show(
117 env, reinterpret_cast<intptr_t>(this), GetEnumeratedIconId(), 117 env, reinterpret_cast<intptr_t>(this), GetEnumeratedIconId(),
118 java_credentials_array.obj())); 118 java_credentials_array.obj()));
119 base::android::ScopedJavaLocalRef<jobject> java_infobar(java_infobar_global); 119 base::android::ScopedJavaLocalRef<jobject> java_infobar(java_infobar_global);
120 content::WebContents* web_contents = 120 content::WebContents* web_contents =
(...skipping 28 matching lines...) Expand all
149 RemoveSelf(); 149 RemoveSelf();
150 } 150 }
151 151
152 AccountChooserInfoBarDelegateAndroid* AccountChooserInfoBar::GetDelegate() { 152 AccountChooserInfoBarDelegateAndroid* AccountChooserInfoBar::GetDelegate() {
153 return static_cast<AccountChooserInfoBarDelegateAndroid*>(delegate()); 153 return static_cast<AccountChooserInfoBarDelegateAndroid*>(delegate());
154 } 154 }
155 155
156 bool RegisterAccountChooserInfoBar(JNIEnv* env) { 156 bool RegisterAccountChooserInfoBar(JNIEnv* env) {
157 return RegisterNativesImpl(env); 157 return RegisterNativesImpl(env);
158 } 158 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698