Index: chrome/browser/android/fullscreen/fullscreen_infobar_delegate.cc |
diff --git a/chrome/browser/android/fullscreen/fullscreen_infobar_delegate.cc b/chrome/browser/android/fullscreen/fullscreen_infobar_delegate.cc |
index 04d0ab359586f089979221ed4653d78790e485bf..b7d222dc41f9b61beb079c133af091e1d1b68617 100644 |
--- a/chrome/browser/android/fullscreen/fullscreen_infobar_delegate.cc |
+++ b/chrome/browser/android/fullscreen/fullscreen_infobar_delegate.cc |
@@ -52,11 +52,10 @@ FullscreenInfoBarDelegate::~FullscreenInfoBarDelegate() { |
} |
void FullscreenInfoBarDelegate::CloseFullscreenInfoBar( |
- JNIEnv* env, jobject obj, jobject tab) { |
+ JNIEnv* env, jobject obj) { |
j_delegate_.Reset(); |
- TabAndroid* tab_android = TabAndroid::GetNativeTab(env, tab); |
- InfoBarService::FromWebContents(tab_android->web_contents())->RemoveInfoBar( |
- infobar()); |
+ if (infobar() && infobar()->owner()) |
+ infobar()->owner()->RemoveInfoBar(infobar()); |
} |
int FullscreenInfoBarDelegate::GetIconID() const { |