Commit c978be79 authored by Christoph Schwering's avatar Christoph Schwering Committed by Commit Bot

Pass parameter to FormCache::PruneInitialValueCaches by cref.

Bug: 1007974
Change-Id: Icc17b93647324cc347aae12cb4679461a2922077
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1883075
Auto-Submit: Christoph Schwering <schwering@google.com>
Reviewed-by: default avatarVadym Doroshenko <dvadym@chromium.org>
Commit-Queue: Vadym Doroshenko <dvadym@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709945}
parent a4d997f2
...@@ -41,8 +41,8 @@ using blink::WebDocument; ...@@ -41,8 +41,8 @@ using blink::WebDocument;
using blink::WebElement; using blink::WebElement;
using blink::WebFormControlElement; using blink::WebFormControlElement;
using blink::WebFormElement; using blink::WebFormElement;
using blink::WebLocalFrame;
using blink::WebInputElement; using blink::WebInputElement;
using blink::WebLocalFrame;
using blink::WebNode; using blink::WebNode;
using blink::WebSelectElement; using blink::WebSelectElement;
using blink::WebString; using blink::WebString;
...@@ -159,7 +159,7 @@ void LogDeprecationMessages(const WebFormControlElement& element) { ...@@ -159,7 +159,7 @@ void LogDeprecationMessages(const WebFormControlElement& element) {
std::string autocomplete_attribute = std::string autocomplete_attribute =
element.GetAttribute("autocomplete").Utf8(); element.GetAttribute("autocomplete").Utf8();
static const char* const deprecated[] = { "region", "locality" }; static const char* const deprecated[] = {"region", "locality"};
for (const char* str : deprecated) { for (const char* str : deprecated) {
if (autocomplete_attribute.find(str) == std::string::npos) if (autocomplete_attribute.find(str) == std::string::npos)
continue; continue;
...@@ -558,7 +558,7 @@ bool FormCache::ShouldShowAutocompleteConsoleWarnings( ...@@ -558,7 +558,7 @@ bool FormCache::ShouldShowAutocompleteConsoleWarnings(
} }
void FormCache::PruneInitialValueCaches( void FormCache::PruneInitialValueCaches(
const std::set<uint32_t> ids_to_retain) { const std::set<uint32_t>& ids_to_retain) {
// Prune initial_select_values_. // Prune initial_select_values_.
for (auto iter = initial_select_values_.begin(); for (auto iter = initial_select_values_.begin();
iter != initial_select_values_.end();) { iter != initial_select_values_.end();) {
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
namespace blink { namespace blink {
class WebFormControlElement; class WebFormControlElement;
class WebLocalFrame; class WebLocalFrame;
} } // namespace blink
namespace autofill { namespace autofill {
...@@ -80,7 +80,7 @@ class FormCache { ...@@ -80,7 +80,7 @@ class FormCache {
// Clears all entries from |initial_select_values_| and // Clears all entries from |initial_select_values_| and
// |initial_checked_state_| whose keys not contained in |ids_to_retain|. // |initial_checked_state_| whose keys not contained in |ids_to_retain|.
void PruneInitialValueCaches(const std::set<uint32_t> ids_to_retain); void PruneInitialValueCaches(const std::set<uint32_t>& ids_to_retain);
// The frame this FormCache is associated with. Weak reference. // The frame this FormCache is associated with. Weak reference.
blink::WebLocalFrame* frame_; blink::WebLocalFrame* frame_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment