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

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

Issue 2531863002: Delete all the traces of federation providers in the account chooser. (Closed)
Patch Set: android2 Created 4 years 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/password_manager/credential_android.h" 5 #include "chrome/browser/password_manager/credential_android.h"
6 6
7 #include "base/android/jni_string.h" 7 #include "base/android/jni_string.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/grit/generated_resources.h" 9 #include "chrome/grit/generated_resources.h"
10 #include "jni/Credential_jni.h" 10 #include "jni/Credential_jni.h"
11 #include "ui/base/l10n/l10n_util.h" 11 #include "ui/base/l10n/l10n_util.h"
12 #include "url/origin.h" 12 #include "url/origin.h"
13 13
14 base::android::ScopedJavaLocalRef<jobject> CreateNativeCredential( 14 base::android::ScopedJavaLocalRef<jobject> CreateNativeCredential(
15 JNIEnv* env, 15 JNIEnv* env,
16 const autofill::PasswordForm& password_form, 16 const autofill::PasswordForm& password_form,
17 int position, 17 int position) {
18 int type) {
19 using base::android::ConvertUTF16ToJavaString; 18 using base::android::ConvertUTF16ToJavaString;
20 using base::android::ConvertUTF8ToJavaString; 19 using base::android::ConvertUTF8ToJavaString;
21 std::string federation = 20 std::string federation =
22 password_form.federation_origin.unique() 21 password_form.federation_origin.unique()
23 ? std::string() 22 ? std::string()
24 : l10n_util::GetStringFUTF8( 23 : l10n_util::GetStringFUTF8(
25 IDS_PASSWORDS_VIA_FEDERATION, 24 IDS_PASSWORDS_VIA_FEDERATION,
26 base::ASCIIToUTF16(password_form.federation_origin.host())); 25 base::ASCIIToUTF16(password_form.federation_origin.host()));
27 return Java_Credential_createCredential( 26 return Java_Credential_createCredential(
28 env, ConvertUTF16ToJavaString(env, password_form.username_value), 27 env, ConvertUTF16ToJavaString(env, password_form.username_value),
29 ConvertUTF16ToJavaString(env, password_form.display_name), 28 ConvertUTF16ToJavaString(env, password_form.display_name),
30 ConvertUTF8ToJavaString(env, federation), type, position); 29 ConvertUTF8ToJavaString(env, federation), position);
31 } 30 }
32 31
33 base::android::ScopedJavaLocalRef<jobjectArray> CreateNativeCredentialArray( 32 base::android::ScopedJavaLocalRef<jobjectArray> CreateNativeCredentialArray(
34 JNIEnv* env, 33 JNIEnv* env,
35 size_t size) { 34 size_t size) {
36 return Java_Credential_createCredentialArray(env, static_cast<int>(size)); 35 return Java_Credential_createCredentialArray(env, static_cast<int>(size));
37 } 36 }
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/credential_android.h ('k') | chrome/browser/ui/passwords/manage_passwords_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698