|
@@ -0,0 +1,39 @@
|
|
|
|
+diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIncognitoManager.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIncognitoManager.java
|
|
|
|
+--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIncognitoManager.java
|
|
|
|
++++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIncognitoManager.java
|
|
|
|
+@@ -50,9 +50,10 @@ public class CustomTabIncognitoManager implements NativeInitObserver, Destroyabl
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void onFinishNativeInitialization() {
|
|
|
|
+- assert ChromeFeatureList.isInitialized();
|
|
|
|
++ //assert ChromeFeatureList.isInitialized();
|
|
|
|
+ if (mIntentDataProvider.isIncognito()
|
|
|
|
+- && ChromeFeatureList.isEnabled(ChromeFeatureList.CCT_INCOGNITO)) {
|
|
|
|
++ //&& ChromeFeatureList.isEnabled(ChromeFeatureList.CCT_INCOGNITO)) {
|
|
|
|
++ ) {
|
|
|
|
+ initializeIncognito();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java
|
|
|
|
+--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java
|
|
|
|
++++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java
|
|
|
|
+@@ -50,6 +50,9 @@ import org.chromium.components.browser_ui.widget.TintedDrawable;
|
|
|
|
+ import org.chromium.components.embedder_support.util.UrlConstants;
|
|
|
|
+ import org.chromium.ui.util.ColorUtils;
|
|
|
|
+
|
|
|
|
++import org.chromium.base.ContextUtils;
|
|
|
|
++import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor;
|
|
|
|
++
|
|
|
|
+ import java.lang.annotation.Retention;
|
|
|
|
+ import java.lang.annotation.RetentionPolicy;
|
|
|
|
+ import java.util.ArrayList;
|
|
|
|
+@@ -398,6 +401,9 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid
|
|
|
|
+ // TODO(https://crbug.com/1023759): Remove this function and enable
|
|
|
|
+ // incognito CCT request for all apps.
|
|
|
|
+ private boolean isValidIncognitoIntent(Intent intent) {
|
|
|
|
++ if (ContextUtils.getAppSharedPreferences().getBoolean(AlwaysIncognitoLinkInterceptor.PREF_ALWAYS_INCOGNITO, false)) {
|
|
|
|
++ return true;
|
|
|
|
++ }
|
|
|
|
+ if (!isIncognitoRequested(intent)) return false;
|
|
|
|
+ // Incognito requests for payments flow are supported without
|
|
|
|
+ // INCOGNITO_CCT flag as an exceptional case that can use Chrome
|