Commit 9a0ad200 authored by Side Yilmaz's avatar Side Yilmaz Committed by Chromium LUCI CQ

Disable Incognito CCT for offline pages.

After enabling Incognito CCT, offline pages starts to use it because of
passing EXTRA_OPEN_NEW_INCOGNITO_TAB true for incognito mode. Although
this is an intended behavior, Incognito CCT fetches downloaded page from
web, instead of fetching it from the disk.

This CL disables Incognito CCT use for offline page and makes offline
page behavior for incognito same with prior Incognito CCT is
introduced. After there will be support for fetching downloaded pages
from disk for incognito, this CL will be reverted.

Bug: 1148275
Change-Id: I30cdc6486fb1725bec5c4f6bb6edb1c97be78782
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2588911Reviewed-by: default avatarScott Little <sclittle@chromium.org>
Commit-Queue: Side YILMAZ <sideyilmaz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#837988}
parent ef8fbdd7
...@@ -158,7 +158,9 @@ public class OfflinePageDownloadBridge { ...@@ -158,7 +158,9 @@ public class OfflinePageDownloadBridge {
intent.setPackage(context.getPackageName()); intent.setPackage(context.getPackageName());
intent.putExtra(Browser.EXTRA_APPLICATION_ID, context.getPackageName()); intent.putExtra(Browser.EXTRA_APPLICATION_ID, context.getPackageName());
intent.putExtra(CustomTabIntentDataProvider.EXTRA_UI_TYPE, CustomTabsUiType.OFFLINE_PAGE); intent.putExtra(CustomTabIntentDataProvider.EXTRA_UI_TYPE, CustomTabsUiType.OFFLINE_PAGE);
intent.putExtra(IntentHandler.EXTRA_OPEN_NEW_INCOGNITO_TAB, isIncognito); // TODO(crbug.com/1148275): Pass isIncognito boolean here after finding a way not to
// reload the downloaded page for Incognito CCT.
intent.putExtra(IntentHandler.EXTRA_OPEN_NEW_INCOGNITO_TAB, false);
IntentHandler.addTrustedIntentExtras(intent); IntentHandler.addTrustedIntentExtras(intent);
if (!(context instanceof Activity)) intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); if (!(context instanceof Activity)) intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment