From 064272d4a1867565bf48bdaae4b8223b1bb38e19 Mon Sep 17 00:00:00 2001 From: Megan Jablonski Date: Tue, 15 Mar 2016 11:24:32 -0700 Subject: [PATCH] Don't create a LoFiBarPopupController if SnackbarManager is null BUG=594381 Review URL: https://codereview.chromium.org/1803823002 Cr-Commit-Position: refs/heads/master@{#381078} (cherry picked from commit e08672445f26f16bf7ed5f217447140cb2f3311a) Review URL: https://codereview.chromium.org/1805093002 . Cr-Commit-Position: refs/branch-heads/2661@{#242} Cr-Branched-From: ef6f6ae5e4c96622286b563658d5cd62a6cf1197-refs/heads/master@{#378081} --- .../java/src/org/chromium/chrome/browser/tab/Tab.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java index baedef15c4a71..10b84c960efc8 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java @@ -565,8 +565,10 @@ public Tab(int id, int parentId, boolean incognito, Context context, mWindowAndroid = window; mLaunchType = type; if (mThemedApplicationContext != null) { - mLoFiBarPopupController = new LoFiBarPopupController( - mThemedApplicationContext, getSnackbarManager()); + if (getSnackbarManager() != null) { + mLoFiBarPopupController = new LoFiBarPopupController( + mThemedApplicationContext, getSnackbarManager()); + } Resources resources = mThemedApplicationContext.getResources(); mIdealFaviconSize = resources.getDimensionPixelSize(R.dimen.default_favicon_size); mDefaultThemeColor = mIncognito