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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenInfoBarDelegate.java

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 | « no previous file | chrome/browser/android/fullscreen/fullscreen_infobar_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenInfoBarDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenInfoBarDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenInfoBarDelegate.java
index b4683ab6f87ba126d95e890f978dd776007a21ec..2f63e766ebd960abb84f3ae8db2eb0e282dfe35f 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenInfoBarDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenInfoBarDelegate.java
@@ -14,7 +14,7 @@ import org.chromium.chrome.browser.tab.Tab;
*/
public class FullscreenInfoBarDelegate {
private final FullscreenHtmlApiHandler mHandler;
- private final Tab mTab;
+ private final boolean mIsForIncognitoTab;
private long mNativeFullscreenInfoBarDelegate = 0;
/**
@@ -31,7 +31,7 @@ public class FullscreenInfoBarDelegate {
FullscreenHtmlApiHandler handler, Tab tab) {
assert tab != null;
mHandler = handler;
- mTab = tab;
+ mIsForIncognitoTab = tab.isIncognito();
mNativeFullscreenInfoBarDelegate = nativeLaunchFullscreenInfoBar(tab);
}
@@ -40,7 +40,7 @@ public class FullscreenInfoBarDelegate {
*/
protected void closeFullscreenInfoBar() {
if (mNativeFullscreenInfoBarDelegate != 0) {
- nativeCloseFullscreenInfoBar(mNativeFullscreenInfoBarDelegate, mTab);
+ nativeCloseFullscreenInfoBar(mNativeFullscreenInfoBarDelegate);
}
}
@@ -51,7 +51,7 @@ public class FullscreenInfoBarDelegate {
*/
@CalledByNative
private void onFullscreenAllowed(String origin) {
- FullscreenInfo fullscreenInfo = new FullscreenInfo(origin, null, mTab.isIncognito());
+ FullscreenInfo fullscreenInfo = new FullscreenInfo(origin, null, mIsForIncognitoTab);
fullscreenInfo.setContentSetting(ContentSetting.ALLOW);
}
@@ -72,5 +72,5 @@ public class FullscreenInfoBarDelegate {
}
private native long nativeLaunchFullscreenInfoBar(Tab tab);
- private native void nativeCloseFullscreenInfoBar(long nativeFullscreenInfoBarDelegate, Tab tab);
+ private native void nativeCloseFullscreenInfoBar(long nativeFullscreenInfoBarDelegate);
}
« no previous file with comments | « no previous file | chrome/browser/android/fullscreen/fullscreen_infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698