Index: chrome/browser/autofill/autofill_interactive_uitest.cc |
diff --git a/chrome/browser/autofill/autofill_interactive_uitest.cc b/chrome/browser/autofill/autofill_interactive_uitest.cc |
index cd67195ee1d913c3f0b79eb84e0632611a4cf2ee..b77df4ce7d126143fca965bc542c6fa8611f0e1c 100644 |
--- a/chrome/browser/autofill/autofill_interactive_uitest.cc |
+++ b/chrome/browser/autofill/autofill_interactive_uitest.cc |
@@ -215,11 +215,8 @@ class AutofillManagerTestDelegateImpl |
content::RenderFrameHost* RenderFrameHostForName( |
content::WebContents* web_contents, |
const std::string& name) { |
- for (content::RenderFrameHost* frame : web_contents->GetAllFrames()) { |
- if (frame->GetFrameName() == name) |
- return frame; |
- } |
- return nullptr; |
+ return content::FrameMatchingPredicate( |
+ web_contents, base::Bind(&content::FrameMatchesName, name)); |
} |
} // namespace |