Make the bloated renderer infobar auto expire on navigation.

When the user navigates while the infobar is visible,
the infobar should disappear.

Bug: 808143
Change-Id: I1265409d7299c6ecd5626e2dae855c7724f7fa48
Reviewed-on: https://chromium-review.googlesource.com/1140303
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575640}
diff --git a/chrome/browser/ui/bloated_renderer/bloated_renderer_tab_helper.cc b/chrome/browser/ui/bloated_renderer/bloated_renderer_tab_helper.cc
index f40a58c..75931d7 100644
--- a/chrome/browser/ui/bloated_renderer/bloated_renderer_tab_helper.cc
+++ b/chrome/browser/ui/bloated_renderer/bloated_renderer_tab_helper.cc
@@ -76,10 +76,12 @@
     // No infobar service in unit-tests.
     return;
   }
+  const bool auto_expire_on_navigation = true;
   SimpleAlertInfoBarDelegate::Create(
       infobar_service,
       infobars::InfoBarDelegate::BLOATED_RENDERER_INFOBAR_DELEGATE, nullptr,
-      l10n_util::GetStringUTF16(IDS_BROWSER_BLOATED_RENDERER_INFOBAR), false);
+      l10n_util::GetStringUTF16(IDS_BROWSER_BLOATED_RENDERER_INFOBAR),
+      auto_expire_on_navigation);
 }
 
 bool BloatedRendererTabHelper::CanReloadBloatedTab() {