OLD | NEW |
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_FORM_AUTOFILL_UTIL_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ |
6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ | 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // should not be created at the same time in the same process. | 68 // should not be created at the same time in the same process. |
69 class ScopedLayoutPreventer { | 69 class ScopedLayoutPreventer { |
70 public: | 70 public: |
71 ScopedLayoutPreventer(); | 71 ScopedLayoutPreventer(); |
72 ~ScopedLayoutPreventer(); | 72 ~ScopedLayoutPreventer(); |
73 | 73 |
74 private: | 74 private: |
75 DISALLOW_COPY_AND_ASSIGN(ScopedLayoutPreventer); | 75 DISALLOW_COPY_AND_ASSIGN(ScopedLayoutPreventer); |
76 }; | 76 }; |
77 | 77 |
| 78 // Helper function that strips any authentication data, as well as query and |
| 79 // ref portions of URL |
| 80 GURL StripAuthAndParams(const GURL& gurl); |
| 81 |
78 // Extract FormData from the form element and return whether the operation was | 82 // Extract FormData from the form element and return whether the operation was |
79 // successful. | 83 // successful. |
80 bool ExtractFormData(const blink::WebFormElement& form_element, FormData* data); | 84 bool ExtractFormData(const blink::WebFormElement& form_element, FormData* data); |
81 | 85 |
82 // Helper function to check if there exist any form on |frame| where its action | 86 // Helper function to check if there exist any form on |frame| where its action |
83 // equals |action|. Returns true if so. For forms with empty or unspecified | 87 // equals |action|. Returns true if so. For forms with empty or unspecified |
84 // actions, all form data are used for comparison. Form data comparison is | 88 // actions, all form data are used for comparison. Form data comparison is |
85 // disabled on Mac and Android because the update prompt isn't implemented. | 89 // disabled on Mac and Android because the update prompt isn't implemented. |
86 // It may cause many false password updates. | 90 // It may cause many false password updates. |
87 // TODO(kolos) Turn on all data comparing when the update prompt will be | 91 // TODO(kolos) Turn on all data comparing when the update prompt will be |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 // |input_element|. Note that |user_input| cannot be easily derived from | 268 // |input_element|. Note that |user_input| cannot be easily derived from |
265 // |input_element| by calling value(), because of http://crbug.com/507714. | 269 // |input_element| by calling value(), because of http://crbug.com/507714. |
266 void PreviewSuggestion(const base::string16& suggestion, | 270 void PreviewSuggestion(const base::string16& suggestion, |
267 const base::string16& user_input, | 271 const base::string16& user_input, |
268 blink::WebFormControlElement* input_element); | 272 blink::WebFormControlElement* input_element); |
269 | 273 |
270 } // namespace form_util | 274 } // namespace form_util |
271 } // namespace autofill | 275 } // namespace autofill |
272 | 276 |
273 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ | 277 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ |
OLD | NEW |