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

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

Issue 2231753002: components: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more call site Created 4 years, 4 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 #include "components/autofill/content/renderer/form_cache.h" 5 #include "components/autofill/content/renderer/form_cache.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 FormData form; 124 FormData form;
125 if (!WebFormElementToFormData(form_element, WebFormControlElement(), 125 if (!WebFormElementToFormData(form_element, WebFormControlElement(),
126 nullptr, extract_mask, &form, nullptr)) { 126 nullptr, extract_mask, &form, nullptr)) {
127 continue; 127 continue;
128 } 128 }
129 129
130 num_fields_seen += form.fields.size(); 130 num_fields_seen += form.fields.size();
131 if (num_fields_seen > form_util::kMaxParseableFields) 131 if (num_fields_seen > form_util::kMaxParseableFields)
132 return forms; 132 return forms;
133 133
134 if (!ContainsKey(parsed_forms_, form) && 134 if (!base::ContainsKey(parsed_forms_, form) &&
135 IsFormInteresting(form, num_editable_elements)) { 135 IsFormInteresting(form, num_editable_elements)) {
136 for (auto it = parsed_forms_.begin(); it != parsed_forms_.end(); ++it) { 136 for (auto it = parsed_forms_.begin(); it != parsed_forms_.end(); ++it) {
137 if (it->SameFormAs(form)) { 137 if (it->SameFormAs(form)) {
138 parsed_forms_.erase(it); 138 parsed_forms_.erase(it);
139 break; 139 break;
140 } 140 }
141 } 141 }
142 142
143 SaveInitialValues(control_elements); 143 SaveInitialValues(control_elements);
144 forms.push_back(form); 144 forms.push_back(form);
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 const WebInputElement* input_element = toWebInputElement(&element); 369 const WebInputElement* input_element = toWebInputElement(&element);
370 if (form_util::IsCheckableElement(input_element)) { 370 if (form_util::IsCheckableElement(input_element)) {
371 initial_checked_state_.insert( 371 initial_checked_state_.insert(
372 std::make_pair(*input_element, input_element->isChecked())); 372 std::make_pair(*input_element, input_element->isChecked()));
373 } 373 }
374 } 374 }
375 } 375 }
376 } 376 }
377 377
378 } // namespace autofill 378 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/content/renderer/form_autofill_util.cc ('k') | components/autofill/core/browser/autofill_country.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698