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

Unified Diff: components/autofill/core/common/password_form.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, 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/password_form.h
diff --git a/components/autofill/core/common/password_form.h b/components/autofill/core/common/password_form.h
index 783eda54786c8e433d20807d7799e65c5523b62b..ab2fec419b77ec77f0906f6e1c927b8e6e6fcd58 100644
--- a/components/autofill/core/common/password_form.h
+++ b/components/autofill/core/common/password_form.h
@@ -9,6 +9,10 @@
#include <string>
#include <vector>
+#if defined(OS_ANDROID)
+#include "base/android/jni_array.h"
+#include "base/android/scoped_java_ref.h"
+#endif
#include "base/time/time.h"
#include "components/autofill/core/common/form_data.h"
#include "url/gurl.h"
@@ -245,6 +249,17 @@ struct PasswordForm {
bool operator==(const PasswordForm& form) const;
bool operator!=(const PasswordForm& form) const;
+#if defined(OS_ANDROID)
+ base::android::ScopedJavaLocalRef<jobject> createNativeCredential(JNIEnv* env,
vabr (Chromium) 2015/02/26 09:29:32 Note that PasswordForm is a struct, so all its dat
+ int type);
+
+ // Creates Java counterpart of 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, int position, int type);
+#endif
+
PasswordForm();
~PasswordForm();
};
@@ -257,6 +272,13 @@ typedef std::map<base::string16, const PasswordForm*> ConstPasswordFormMap;
// For testing.
std::ostream& operator<<(std::ostream& os,
const autofill::PasswordForm& form);
+#if defined(OS_ANDROID)
+base::android::ScopedJavaLocalRef<jobjectArray> CreateNativeCredentialArray(
+ JNIEnv* env,
+ size_t size);
+
+bool RegisterCredential(JNIEnv* env);
+#endif
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698