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

Side by Side 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, 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ 5 #ifndef COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__
6 #define COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ 6 #define COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #if defined(OS_ANDROID)
13 #include "base/android/jni_array.h"
14 #include "base/android/scoped_java_ref.h"
15 #endif
12 #include "base/time/time.h" 16 #include "base/time/time.h"
13 #include "components/autofill/core/common/form_data.h" 17 #include "components/autofill/core/common/form_data.h"
14 #include "url/gurl.h" 18 #include "url/gurl.h"
15 19
16 namespace autofill { 20 namespace autofill {
17 21
18 // The PasswordForm struct encapsulates information about a login form, 22 // The PasswordForm struct encapsulates information about a login form,
19 // which can be an HTML form or a dialog with username/password text fields. 23 // which can be an HTML form or a dialog with username/password text fields.
20 // 24 //
21 // The Web Data database stores saved username/passwords and associated form 25 // The Web Data database stores saved username/passwords and associated form
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 // Once user selects this credential the flag is reseted. 242 // Once user selects this credential the flag is reseted.
239 bool skip_zero_click; 243 bool skip_zero_click;
240 244
241 // Returns true if this match was found using public suffix matching. 245 // Returns true if this match was found using public suffix matching.
242 bool IsPublicSuffixMatch() const; 246 bool IsPublicSuffixMatch() const;
243 247
244 // Equality operators for testing. 248 // Equality operators for testing.
245 bool operator==(const PasswordForm& form) const; 249 bool operator==(const PasswordForm& form) const;
246 bool operator!=(const PasswordForm& form) const; 250 bool operator!=(const PasswordForm& form) const;
247 251
252 #if defined(OS_ANDROID)
253 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
254 int type);
255
256 // Creates Java counterpart of PasswordForm, assigning it a |position| in case
257 // form is part of some array of forms and |type| which should be either local
258 // or federated.
259 base::android::ScopedJavaLocalRef<jobject>
260 createNativeCredential(JNIEnv* env, int position, int type);
261 #endif
262
248 PasswordForm(); 263 PasswordForm();
249 ~PasswordForm(); 264 ~PasswordForm();
250 }; 265 };
251 266
252 // Map username to PasswordForm* for convenience. See password_form_manager.h. 267 // Map username to PasswordForm* for convenience. See password_form_manager.h.
253 typedef std::map<base::string16, PasswordForm*> PasswordFormMap; 268 typedef std::map<base::string16, PasswordForm*> PasswordFormMap;
254 269
255 typedef std::map<base::string16, const PasswordForm*> ConstPasswordFormMap; 270 typedef std::map<base::string16, const PasswordForm*> ConstPasswordFormMap;
256 271
257 // For testing. 272 // For testing.
258 std::ostream& operator<<(std::ostream& os, 273 std::ostream& operator<<(std::ostream& os,
259 const autofill::PasswordForm& form); 274 const autofill::PasswordForm& form);
275 #if defined(OS_ANDROID)
276 base::android::ScopedJavaLocalRef<jobjectArray> CreateNativeCredentialArray(
277 JNIEnv* env,
278 size_t size);
279
280 bool RegisterCredential(JNIEnv* env);
281 #endif
260 282
261 } // namespace autofill 283 } // namespace autofill
262 284
263 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ 285 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698