Fix crasher with autofill infobar.
The "save credit card" information was deleted by the AutofillManager when the form is submitted but was still pointed to by the TabContents, causing a crasher when navigating.

BUG=50428
TEST=See steps in 56238.

Review URL: http://codereview.chromium.org/3466006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60095 0039d316-1c4b-4281-b951-d872f2087c98
void TranslateManager::PageTranslated(TabContents* tab,
                                      PageTranslatedDetails* details) {
  TranslateInfoBarDelegate* infobar;
  if (details->error_type != TranslateErrors::NONE) {
    infobar = TranslateInfoBarDelegate::CreateErrorDelegate(
        details->error_type, tab,
        details->source_language, details->target_language);
  } else if (!IsSupportedLanguage(details->source_language)) {
    UMA_HISTOGRAM_COUNTS("Translate.ServerReportedUnsupportedLanguage", 1);
    infobar = TranslateInfoBarDelegate::CreateErrorDelegate(
        TranslateErrors::UNSUPPORTED_LANGUAGE, tab,
        details->source_language, details->target_language);
  } else {
    infobar = TranslateInfoBarDelegate::CreateDelegate(
        TranslateInfoBarDelegate::AFTER_TRANSLATE, tab,
        details->source_language, details->target_language);
  }
  ShowInfoBar(tab, infobar);
}

void TranslateManager::PageTranslated(TabContents* tab,
                                      PageTranslatedDetails* details) {
  TranslateInfoBarDelegate* infobar;
  if (details->error_type != TranslateErrors::NONE) {
    infobar = TranslateInfoBarDelegate::CreateErrorDelegate(
        details->error_type, tab,
        details->source_language, details->target_language);
  } else if (!IsSupportedLanguage(details->source_language)) {
    UMA_HISTOGRAM_COUNTS("Translate.ServerReportedUnsupportedLanguage", 1);
    infobar = TranslateInfoBarDelegate::CreateErrorDelegate(
        TranslateErrors::UNSUPPORTED_LANGUAGE, tab,
        details->source_language, details->target_language);
  } else {
    infobar = TranslateInfoBarDelegate::CreateDelegate(
        TranslateInfoBarDelegate::AFTER_TRANSLATE, tab,
        details->source_language, details->target_language);
  }
  ShowInfoBar(tab, infobar);
}
