| Index: chrome/browser/autofill/autofill_external_delegate.cc
|
| diff --git a/chrome/browser/autofill/autofill_external_delegate.cc b/chrome/browser/autofill/autofill_external_delegate.cc
|
| index a199b06048252b132c5426cffdab26dc74f5e838..912892e852c2f5523f1dbe32fc4f3356ffe78d02 100644
|
| --- a/chrome/browser/autofill/autofill_external_delegate.cc
|
| +++ b/chrome/browser/autofill/autofill_external_delegate.cc
|
| @@ -18,8 +18,7 @@
|
| using content::RenderViewHost;
|
| using WebKit::WebAutofillClient;
|
|
|
| -AutofillExternalDelegate::~AutofillExternalDelegate() {
|
| -}
|
| +AutofillExternalDelegate::~AutofillExternalDelegate() {}
|
|
|
| AutofillExternalDelegate::AutofillExternalDelegate(
|
| TabContents* tab_contents,
|
| @@ -211,8 +210,12 @@ bool AutofillExternalDelegate::DidAcceptAutofillSuggestions(
|
| }
|
|
|
| void AutofillExternalDelegate::ClearPreviewedForm() {
|
| - RenderViewHost* host = tab_contents_->web_contents()->GetRenderViewHost();
|
| - host->Send(new AutofillMsg_ClearPreviewedForm(host->GetRoutingID()));
|
| + if (tab_contents_ && tab_contents_->web_contents()) {
|
| + RenderViewHost* host = tab_contents_->web_contents()->GetRenderViewHost();
|
| +
|
| + if (host)
|
| + host->Send(new AutofillMsg_ClearPreviewedForm(host->GetRoutingID()));
|
| + }
|
| }
|
|
|
| void AutofillExternalDelegate::HideAutofillPopup() {
|
| @@ -343,11 +346,8 @@ void AutofillExternalDelegate::InsertDataListValues(
|
| data_list_unique_ids_.end());
|
| }
|
|
|
| -// Add a "!defined(OS_YOUROS) for each platform that implements this
|
| -// in an autofill_external_delegate_YOUROS.cc. Currently there are
|
| -// none, so all platforms use the default.
|
|
|
| -#if !defined(OS_ANDROID) && !defined(TOOLKIT_GTK)
|
| +#if defined(OS_MACOSX)
|
|
|
| AutofillExternalDelegate* AutofillExternalDelegate::Create(
|
| TabContents*, AutofillManager*) {
|
|
|