Commit ea8523e3 authored by Ramin Halavati's avatar Ramin Halavati Committed by Commit Bot

Remove deprecated CustomTabIncognitoManager::hasIsolatedProfile().

Deprecated function is removed and all use cases are updated.

Bug: 1023759
Change-Id: I1b085e1a796af0f7745ca35c7b4ddb5632cd1e26
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2340050Reviewed-by: default avatarRohit Agarwal <roagarwal@chromium.org>
Reviewed-by: default avatarPeter Conn <peconn@chromium.org>
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#795867}
parent a50c6e06
......@@ -87,11 +87,6 @@ public class CustomTabIncognitoManager implements NativeInitObserver, Destroyabl
}
}
// TODO(crbug.com/1023759): Remove this function.
public static boolean hasIsolatedProfile() {
return true;
}
private void initializeIncognito() {
mIncognitoTabHost = new IncognitoCustomTabHost();
IncognitoTabHostRegistry.getInstance().register(mIncognitoTabHost);
......
......@@ -27,7 +27,6 @@ import org.chromium.base.test.params.ParameterizedRunner;
import org.chromium.base.test.util.CommandLineFlags;
import org.chromium.chrome.browser.ChromeTabbedActivity;
import org.chromium.chrome.browser.customtabs.CustomTabActivityTestRule;
import org.chromium.chrome.browser.customtabs.CustomTabIncognitoManager;
import org.chromium.chrome.browser.flags.ChromeFeatureList;
import org.chromium.chrome.browser.flags.ChromeSwitches;
import org.chromium.chrome.browser.incognito.IncognitoDataTestUtils.ActivityType;
......@@ -134,7 +133,7 @@ public class IncognitoCookieLeakageTest {
Tab getter_tab = incognitoActivity2.launchUrl(
mChromeActivityTestRule, mCustomTabActivityTestRule, mCookiesTestPage);
String expected = CustomTabIncognitoManager.hasIsolatedProfile() ? "\"\"" : "\"Foo=Bar\"";
String expected = "\"\"";
assertCookies(getter_tab, expected);
}
......
......@@ -37,7 +37,6 @@ import org.chromium.base.test.util.FlakyTest;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ChromeTabbedActivity;
import org.chromium.chrome.browser.customtabs.CustomTabActivityTestRule;
import org.chromium.chrome.browser.customtabs.CustomTabIncognitoManager;
import org.chromium.chrome.browser.flags.ChromeFeatureList;
import org.chromium.chrome.browser.flags.ChromeSwitches;
import org.chromium.chrome.browser.incognito.IncognitoDataTestUtils.ActivityType;
......@@ -192,13 +191,9 @@ public class IncognitoPermissionLeakageTest {
// Request permission in incognitoActivity2's tab.
requestLocationPermission(tab2);
// Incognito CCTs with isolated profiles should not inherit permissions from other sessions.
if (CustomTabIncognitoManager.hasIsolatedProfile()) {
// Permission is asked again, therefore the previous permission wasn't inherited.
assertDialogIsShown();
} else {
assertDialogIsNotShown();
}
// Incognito CCTs should not inherit permissions from other sessions.
// If permission is asked again, we can infer that the previous permission wasn't inherited.
assertDialogIsShown();
}
@Test
......@@ -223,13 +218,9 @@ public class IncognitoPermissionLeakageTest {
// Request permission now in incognitoActivity2's tab.
requestLocationPermission(tab2);
// Incognito CCTs with isolated profiles should not inherit permissions from other sessions.
if (CustomTabIncognitoManager.hasIsolatedProfile()) {
// Permission is asked again, therefore the previous permission wasn't inherited.
assertDialogIsShown();
} else {
assertDialogIsNotShown();
}
// Incognito CCTs should not inherit permissions from other sessions.
// If permission is asked again, we can infer that the previous permission wasn't inherited.
assertDialogIsShown();
}
@Test
......
......@@ -26,7 +26,6 @@ import org.chromium.base.test.util.CommandLineFlags;
import org.chromium.base.test.util.DisabledTest;
import org.chromium.chrome.browser.ChromeTabbedActivity;
import org.chromium.chrome.browser.customtabs.CustomTabActivityTestRule;
import org.chromium.chrome.browser.customtabs.CustomTabIncognitoManager;
import org.chromium.chrome.browser.flags.ChromeFeatureList;
import org.chromium.chrome.browser.flags.ChromeSwitches;
import org.chromium.chrome.browser.incognito.IncognitoDataTestUtils.ActivityType;
......@@ -146,13 +145,6 @@ public class IncognitoStorageLeakageTest {
for (String type : sSiteData) {
String expected = "false";
// Both activity types are incognito (one of them being CCT) and they share the storage
// only if incognito CCT doesn't have an isolated profile.
if (activity1.incognito && activity2.incognito
&& !CustomTabIncognitoManager.hasIsolatedProfile()) {
expected = "true";
}
// Both activity types are regular and they share storages.
if (!activity1.incognito && !activity2.incognito) {
expected = "true";
......
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