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

Side by Side Diff: webkit/glue/form_field_values.cc

Issue 668208: Don't send form data that is marked autocomplete off to the browser.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/form_autocomplete_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/string16.h" 7 #include "base/string16.h"
8 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" 8 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
9 #include "third_party/WebKit/WebKit/chromium/public/WebFormElement.h" 9 #include "third_party/WebKit/WebKit/chromium/public/WebFormElement.h"
10 #include "third_party/WebKit/WebKit/chromium/public/WebInputElement.h" 10 #include "third_party/WebKit/WebKit/chromium/public/WebInputElement.h"
(...skipping 25 matching lines...) Expand all
36 return result; 36 return result;
37 } 37 }
38 38
39 void FormFieldValues::ExtractFormFieldValues(const WebFormElement& form) { 39 void FormFieldValues::ExtractFormFieldValues(const WebFormElement& form) {
40 WebVector<WebInputElement> input_elements; 40 WebVector<WebInputElement> input_elements;
41 form.getInputElements(input_elements); 41 form.getInputElements(input_elements);
42 42
43 for (size_t i = 0; i < input_elements.size(); i++) { 43 for (size_t i = 0; i < input_elements.size(); i++) {
44 const WebInputElement& input_element = input_elements[i]; 44 const WebInputElement& input_element = input_elements[i];
45 if (input_element.isEnabledFormControl()) { 45 if (input_element.isEnabledFormControl()) {
46 // TODO(jhawkins): Remove this check when we have labels. 46 // TODO(jhawkins): Remove the check nameForAutofill().isEmpty() when we
47 if (!input_element.nameForAutofill().isEmpty()) 47 // have labels.
48 if (input_element.autoComplete() &&
49 input_element.inputType() != WebInputElement::Password &&
50 !input_element.nameForAutofill().isEmpty()) {
48 elements.push_back(FormField(input_element)); 51 elements.push_back(FormField(input_element));
52 }
49 } 53 }
50 } 54 }
51 } 55 }
52 56
53 } // namespace webkit_glue 57 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « chrome/renderer/form_autocomplete_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698