| Index: components/autofill/core/common/android/java/src/org/chromium/components/autofill/core/common/Credential.java
|
| diff --git a/components/autofill/core/common/android/java/src/org/chromium/components/autofill/core/common/Credential.java b/components/autofill/core/common/android/java/src/org/chromium/components/autofill/core/common/Credential.java
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0e87d81e360c78c57cde33b171b389dfa1037c3b
|
| --- /dev/null
|
| +++ b/components/autofill/core/common/android/java/src/org/chromium/components/autofill/core/common/Credential.java
|
| @@ -0,0 +1,58 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +package org.chromium.components.autofill.core.common;
|
| +
|
| +import org.chromium.base.CalledByNative;
|
| +
|
| +/**
|
| + * Credential type which is used to represent credential which will be shown in account chooser
|
| + * infobar.
|
| + * */
|
| +public class Credential {
|
| + private final String mUsername;
|
| + private final String mDisplayName;
|
| + private final String mAvatarUrl;
|
| + private final int mType;
|
| + private final int mIndex;
|
| +
|
| + public Credential(String username, String displayName, String avatarUrl, int type, int index) {
|
| + mUsername = username;
|
| + mDisplayName = displayName;
|
| + mAvatarUrl = avatarUrl;
|
| + mType = type;
|
| + mIndex = index;
|
| + }
|
| +
|
| + public String getUsername() {
|
| + return mUsername;
|
| + }
|
| +
|
| + public String getDisplayName() {
|
| + return mDisplayName;
|
| + }
|
| +
|
| + public String getAvatarURL() {
|
| + return mAvatarUrl;
|
| + }
|
| +
|
| + public int getIndex() {
|
| + return mIndex;
|
| + }
|
| +
|
| + public int getType() {
|
| + return mType;
|
| + }
|
| +
|
| + @CalledByNative
|
| + private static Credential createCredential(
|
| + String username, String displayName, String avatarURL, int type, int index) {
|
| + return new Credential(username, displayName, avatarURL, type, index);
|
| + }
|
| +
|
| + @CalledByNative
|
| + private static Credential[] createCredentialArray(int size) {
|
| + return new Credential[size];
|
| + }
|
| +}
|
|
|