| 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 #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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 replacements.push_back(base::UTF8ToUTF16(field.signature)); | 321 replacements.push_back(base::UTF8ToUTF16(field.signature)); |
| 322 replacements.push_back(base::UTF8ToUTF16(form.signature)); | 322 replacements.push_back(base::UTF8ToUTF16(form.signature)); |
| 323 const base::string16 title = l10n_util::GetStringFUTF16( | 323 const base::string16 title = l10n_util::GetStringFUTF16( |
| 324 IDS_AUTOFILL_SHOW_PREDICTIONS_TITLE, replacements, nullptr); | 324 IDS_AUTOFILL_SHOW_PREDICTIONS_TITLE, replacements, nullptr); |
| 325 element.setAttribute("title", WebString(title)); | 325 element.setAttribute("title", WebString(title)); |
| 326 } | 326 } |
| 327 | 327 |
| 328 return true; | 328 return true; |
| 329 } | 329 } |
| 330 | 330 |
| 331 FormData FormCache::GetSyntheticForm() { |
| 332 return synthetic_form_; |
| 333 } |
| 334 |
| 331 size_t FormCache::ScanFormControlElements( | 335 size_t FormCache::ScanFormControlElements( |
| 332 const std::vector<WebFormControlElement>& control_elements, | 336 const std::vector<WebFormControlElement>& control_elements, |
| 333 bool log_deprecation_messages) { | 337 bool log_deprecation_messages) { |
| 334 size_t num_editable_elements = 0; | 338 size_t num_editable_elements = 0; |
| 335 for (size_t i = 0; i < control_elements.size(); ++i) { | 339 for (size_t i = 0; i < control_elements.size(); ++i) { |
| 336 const WebFormControlElement& element = control_elements[i]; | 340 const WebFormControlElement& element = control_elements[i]; |
| 337 | 341 |
| 338 if (log_deprecation_messages) | 342 if (log_deprecation_messages) |
| 339 LogDeprecationMessages(element); | 343 LogDeprecationMessages(element); |
| 340 | 344 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 364 const WebInputElement* input_element = toWebInputElement(&element); | 368 const WebInputElement* input_element = toWebInputElement(&element); |
| 365 if (form_util::IsCheckableElement(input_element)) { | 369 if (form_util::IsCheckableElement(input_element)) { |
| 366 initial_checked_state_.insert( | 370 initial_checked_state_.insert( |
| 367 std::make_pair(*input_element, input_element->isChecked())); | 371 std::make_pair(*input_element, input_element->isChecked())); |
| 368 } | 372 } |
| 369 } | 373 } |
| 370 } | 374 } |
| 371 } | 375 } |
| 372 | 376 |
| 373 } // namespace autofill | 377 } // namespace autofill |
| OLD | NEW |