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

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

Issue 1172753003: Move LowerCaseEqualsASCII to base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util
Patch Set: 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
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_autofill_util.h" 5 #include "components/autofill/content/renderer/form_autofill_util.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 // WebFormElementToFormData. 1176 // WebFormElementToFormData.
1177 field->name = element.nameForAutofill(); 1177 field->name = element.nameForAutofill();
1178 field->form_control_type = element.formControlType().utf8(); 1178 field->form_control_type = element.formControlType().utf8();
1179 field->autocomplete_attribute = element.getAttribute(kAutocomplete).utf8(); 1179 field->autocomplete_attribute = element.getAttribute(kAutocomplete).utf8();
1180 if (field->autocomplete_attribute.size() > kMaxDataLength) { 1180 if (field->autocomplete_attribute.size() > kMaxDataLength) {
1181 // Discard overly long attribute values to avoid DOS-ing the browser 1181 // Discard overly long attribute values to avoid DOS-ing the browser
1182 // process. However, send over a default string to indicate that the 1182 // process. However, send over a default string to indicate that the
1183 // attribute was present. 1183 // attribute was present.
1184 field->autocomplete_attribute = "x-max-data-length-exceeded"; 1184 field->autocomplete_attribute = "x-max-data-length-exceeded";
1185 } 1185 }
1186 if (LowerCaseEqualsASCII(element.getAttribute(kRole), "presentation")) 1186 if (base::LowerCaseEqualsASCII(element.getAttribute(kRole), "presentation"))
1187 field->role = FormFieldData::ROLE_ATTRIBUTE_PRESENTATION; 1187 field->role = FormFieldData::ROLE_ATTRIBUTE_PRESENTATION;
1188 1188
1189 if (!IsAutofillableElement(element)) 1189 if (!IsAutofillableElement(element))
1190 return; 1190 return;
1191 1191
1192 const WebInputElement* input_element = toWebInputElement(&element); 1192 const WebInputElement* input_element = toWebInputElement(&element);
1193 if (IsAutofillableInputElement(input_element) || 1193 if (IsAutofillableInputElement(input_element) ||
1194 IsTextAreaElement(element)) { 1194 IsTextAreaElement(element)) {
1195 field->is_autofilled = element.isAutofilled(); 1195 field->is_autofilled = element.isAutofilled();
1196 field->is_focusable = element.isFocusable(); 1196 field->is_focusable = element.isFocusable();
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
1528 1528
1529 gfx::RectF GetScaledBoundingBox(float scale, WebElement* element) { 1529 gfx::RectF GetScaledBoundingBox(float scale, WebElement* element) {
1530 gfx::Rect bounding_box(element->boundsInViewportSpace()); 1530 gfx::Rect bounding_box(element->boundsInViewportSpace());
1531 return gfx::RectF(bounding_box.x() * scale, 1531 return gfx::RectF(bounding_box.x() * scale,
1532 bounding_box.y() * scale, 1532 bounding_box.y() * scale,
1533 bounding_box.width() * scale, 1533 bounding_box.width() * scale,
1534 bounding_box.height() * scale); 1534 bounding_box.height() * scale);
1535 } 1535 }
1536 1536
1537 } // namespace autofill 1537 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698