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

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

Issue 1161793006: [Autofill] Don't hold onto stale form field pointers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: thestig review Created 5 years, 6 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
« no previous file with comments | « no previous file | components/autofill/content/renderer/form_cache.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_FORM_CACHE_H_ 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_CACHE_H_
6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_CACHE_H_ 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_CACHE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 private: 51 private:
52 // Scans |control_elements| and returns the number of editable elements. 52 // Scans |control_elements| and returns the number of editable elements.
53 // Also remembers the initial <select> and <input> element states, and 53 // Also remembers the initial <select> and <input> element states, and
54 // logs warning messages for deprecated attribute if 54 // logs warning messages for deprecated attribute if
55 // |log_deprecation_messages| is set. 55 // |log_deprecation_messages| is set.
56 size_t ScanFormControlElements( 56 size_t ScanFormControlElements(
57 const std::vector<blink::WebFormControlElement>& control_elements, 57 const std::vector<blink::WebFormControlElement>& control_elements,
58 bool log_deprecation_messages); 58 bool log_deprecation_messages);
59 59
60 // Saves initial state of checkbox and select elements.
61 void SaveInitialValues(
62 const std::vector<blink::WebFormControlElement>& control_elements);
63
60 // The frame this FormCache is associated with. 64 // The frame this FormCache is associated with.
61 const blink::WebFrame& frame_; 65 const blink::WebFrame& frame_;
62 66
63 // The cached forms. Used to prevent re-extraction of forms. 67 // The cached forms. Used to prevent re-extraction of forms.
64 std::set<FormData> parsed_forms_; 68 std::set<FormData> parsed_forms_;
65 69
66 // The synthetic FormData is for all the fieldsets in the document without a 70 // The synthetic FormData is for all the fieldsets in the document without a
67 // form owner. 71 // form owner.
68 FormData synthetic_form_; 72 FormData synthetic_form_;
69 73
70 // The cached initial values for <select> elements. 74 // The cached initial values for <select> elements.
71 std::map<const blink::WebSelectElement, base::string16> 75 std::map<const blink::WebSelectElement, base::string16>
72 initial_select_values_; 76 initial_select_values_;
73 77
74 // The cached initial values for checkable <input> elements. 78 // The cached initial values for checkable <input> elements.
75 std::map<const blink::WebInputElement, bool> initial_checked_state_; 79 std::map<const blink::WebInputElement, bool> initial_checked_state_;
76 80
77 DISALLOW_COPY_AND_ASSIGN(FormCache); 81 DISALLOW_COPY_AND_ASSIGN(FormCache);
78 }; 82 };
79 83
80 } // namespace autofill 84 } // namespace autofill
81 85
82 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_CACHE_H_ 86 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_CACHE_H_
OLDNEW
« no previous file with comments | « no previous file | components/autofill/content/renderer/form_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698