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

Unified Diff: chrome/browser/password_manager/credential_android.h

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, 9 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: chrome/browser/password_manager/credential_android.h
diff --git a/chrome/browser/password_manager/credential_android.h b/chrome/browser/password_manager/credential_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..6f450e183c599e8afc202449e30313dfde294eea
--- /dev/null
+++ b/chrome/browser/password_manager/credential_android.h
@@ -0,0 +1,29 @@
+// 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.
+
+#ifndef CHROME_BROWSER_PASSWORD_MANAGER_CREDENTIAL_ANDROID_H_
+#define CHROME_BROWSER_PASSWORD_MANAGER_CREDENTIAL_ANDROID_H_
+
+#include "base/android/jni_array.h"
+#include "base/android/scoped_java_ref.h"
+#include "components/autofill/core/common/password_form.h"
+
+// Creates Java counterpart of autofill::PasswordForm, assigning it a |position|
+// in case form is part of some array of forms and |type| which should be either
+// local or federated.
+base::android::ScopedJavaLocalRef<jobject> CreateNativeCredential(
+ JNIEnv* env,
+ const autofill::PasswordForm& password_form,
+ int position,
+ int type);
+
+// Creates Java Credential[] array of size |size|.
+base::android::ScopedJavaLocalRef<jobjectArray> CreateNativeCredentialArray(
+ JNIEnv* env,
+ size_t size);
+
+// Registers the Credential native method.
+bool RegisterCredential(JNIEnv* env);
+
+#endif // CHROME_BROWSER_PASSWORD_MANAGER_CREDENTIAL_ANDROID_H_

Powered by Google App Engine
This is Rietveld 408576698