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

Side by Side Diff: components/autofill/content/renderer/password_form_conversion_utils.h

Issue 1028163002: Processing USERNAME reply from Autofill server in Password Manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 8 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_CONTENT_RENDERER_PASSWORD_FORM_CONVERSION_UTILS_H_ 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_FORM_CONVERSION_UTILS_H_
6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_FORM_CONVERSION_UTILS_H_ 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_FORM_CONVERSION_UTILS_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 11
12 namespace blink { 12 namespace blink {
13 class WebFormElement; 13 class WebFormElement;
14 class WebInputElement; 14 class WebInputElement;
15 class WebString; 15 class WebString;
16 } 16 }
17 17
18 namespace autofill { 18 namespace autofill {
19 19
20 struct FormData;
21 struct FormFieldData;
20 struct PasswordForm; 22 struct PasswordForm;
21 23
22 // Create a PasswordForm from DOM form. Webkit doesn't allow storing 24 // Create a PasswordForm from DOM form. Webkit doesn't allow storing
23 // custom metadata to DOM nodes, so we have to do this every time an event 25 // custom metadata to DOM nodes, so we have to do this every time an event
24 // happens with a given form and compare against previously Create'd forms 26 // happens with a given form and compare against previously Create'd forms
25 // to identify..which sucks. 27 // to identify..which sucks.
26 // If an element of |form| has an entry in |nonscript_modified_values|, the 28 // If an element of |form| has an entry in |nonscript_modified_values|, the
27 // associated string is used instead of the element's value to create 29 // associated string is used instead of the element's value to create
28 // the PasswordForm. 30 // the PasswordForm.
31 // |form_predictions| is Autofill server response, if present it's used for
32 // overwriting default username element selection.
29 scoped_ptr<PasswordForm> CreatePasswordForm( 33 scoped_ptr<PasswordForm> CreatePasswordForm(
30 const blink::WebFormElement& form, 34 const blink::WebFormElement& form,
31 const std::map<const blink::WebInputElement, blink::WebString>* 35 const std::map<const blink::WebInputElement, blink::WebString>*
32 nonscript_modified_values); 36 nonscript_modified_values,
37 const std::map<autofill::FormData, autofill::FormFieldData>*
38 form_predictions);
33 39
34 } // namespace autofill 40 } // namespace autofill
35 41
36 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_FORM_CONVERSION_UTILS_H __ 42 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_FORM_CONVERSION_UTILS_H __
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698