Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2753)

Unified Diff: chrome/browser/android/fullscreen/fullscreen_infobar_delegate.cc

Issue 1340693002: Speculative hardening of fullscreen infobar code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2490
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/fullscreen/fullscreen_infobar_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « chrome/browser/android/fullscreen/fullscreen_infobar_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698