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

Unified Diff: components/autofill/core/common/android/java/src/org/chromium/components/autofill/core/common/Credential.java

Issue 925593006: Pass all info to account chooser infobar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@java_cpp_enum
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
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];
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698