From 7a23d81958a00cbfd11ca17d6cc17abe20950364 Mon Sep 17 00:00:00 2001 From: "tonyg@chromium.org" Date: Tue, 3 Dec 2013 15:38:57 +0000 Subject: Revert 238283 "Infobar system refactor." Crashes on android BUG=325216 > Infobar system refactor. > > This changes the ownership model of infobars so that InfoBars are long-lived and > own their InfoBarDelegates directly. The InfoBarService pseudo-owns the > InfoBars (instead of deleting them directly, it tells them when they're unowned > and expects them to delete themselves). > > This fixes leaks when infobars are closed while not visible (e.g. in a > background tab) and in general makes the system clearer and easier to reason > about. > > BUG=62154 > TEST=none > R=erg@chromium.org, sail@chromium.org, sky@chromium.org > > Review URL: https://codereview.chromium.org/22694006 TBR=pkasting@chromium.org Review URL: https://codereview.chromium.org/102163002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238402 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/test/gpu/webgl_infobar_browsertest.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'chrome/test/gpu') diff --git a/chrome/test/gpu/webgl_infobar_browsertest.cc b/chrome/test/gpu/webgl_infobar_browsertest.cc index 086ea16..ab362eb 100644 --- a/chrome/test/gpu/webgl_infobar_browsertest.cc +++ b/chrome/test/gpu/webgl_infobar_browsertest.cc @@ -7,7 +7,6 @@ #include "base/strings/utf_string_conversions.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/infobars/confirm_infobar_delegate.h" -#include "chrome/browser/infobars/infobar.h" #include "chrome/browser/infobars/infobar_service.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_commands.h" @@ -142,7 +141,7 @@ IN_PROC_BROWSER_TEST_F(WebGLInfoBarTest, MAYBE_ContextLossInfoBarReload) { InfoBarService* infobar_service = InfoBarService::FromWebContents( browser()->tab_strip_model()->GetActiveWebContents()); ASSERT_EQ(1u, infobar_service->infobar_count()); - InfoBarDelegate* delegate = infobar_service->infobar_at(0)->delegate(); + InfoBarDelegate* delegate = infobar_service->infobar_at(0); ASSERT_TRUE(delegate->AsThreeDAPIInfoBarDelegate()); delegate->AsConfirmInfoBarDelegate()->Cancel(); -- cgit v1.1