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

Unified Diff: components/autofill/content/browser/autofill_driver_impl.cc

Issue 176943007: Check for Renderer in SendAutofillTypePredictionsToRenderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/content/browser/autofill_driver_impl.cc
diff --git a/components/autofill/content/browser/autofill_driver_impl.cc b/components/autofill/content/browser/autofill_driver_impl.cc
index b6d7cbc70d2a0036b8a16ee5bf19d76f58c94042..81eca14620c15068b1277df446050e2fbc696ca6 100644
--- a/components/autofill/content/browser/autofill_driver_impl.cc
+++ b/components/autofill/content/browser/autofill_driver_impl.cc
@@ -120,9 +120,9 @@ void AutofillDriverImpl::SendAutofillTypePredictionsToRenderer(
switches::kShowAutofillTypePredictions))
return;
- content::RenderViewHost* host = web_contents()->GetRenderViewHost();
- if (!host)
+ if (!RendererIsAvailable())
return;
+ content::RenderViewHost* host = web_contents()->GetRenderViewHost();
std::vector<FormDataPredictions> type_predictions;
FormStructure::GetFieldTypePredictions(forms, &type_predictions);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698