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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java

Issue 2393993005: Revert "[Custom Tabs] Implement "Read It Later" Behind a Flag" (Closed)
Patch Set: compile Created 4 years, 2 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
Index: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
index c2181202e3520e892c56673f22871516a4d98950..549b5d2cf7ef7654a8adb52c20b44e12da9be129 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
@@ -34,7 +34,6 @@ import org.chromium.base.metrics.RecordHistogram;
import org.chromium.base.metrics.RecordUserAction;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ChromeActivity;
-import org.chromium.chrome.browser.ChromeFeatureList;
import org.chromium.chrome.browser.IntentHandler;
import org.chromium.chrome.browser.IntentHandler.ExternalAppId;
import org.chromium.chrome.browser.KeyboardShortcuts;
@@ -732,13 +731,9 @@ public class CustomTabActivity extends ChromeActivity {
|| id == R.id.open_history_menu_id) {
return true;
} else if (id == R.id.open_in_browser_id) {
- openCurrentUrlInBrowser(false, true);
+ openCurrentUrlInBrowser(false);
RecordUserAction.record("CustomTabsMenuOpenInChrome");
return true;
- } else if (id == R.id.read_it_later_id) {
- openCurrentUrlInBrowser(false, false);
- RecordUserAction.record("CustomTabsMenuReadItLater");
- return true;
} else if (id == R.id.info_menu_id) {
if (getTabModelSelector().getCurrentTab() == null) return false;
WebsiteSettingsPopup.show(
@@ -783,10 +778,10 @@ public class CustomTabActivity extends ChromeActivity {
/**
* Opens the URL currently being displayed in the Custom Tab in the regular browser.
* @param forceReparenting Whether tab reparenting should be forced for testing.
- * @param stayInChrome Whether the user stays in Chrome after the tab is reparented.
+ *
* @return Whether or not the tab was sent over successfully.
*/
- boolean openCurrentUrlInBrowser(boolean forceReparenting, boolean stayInChrome) {
+ boolean openCurrentUrlInBrowser(boolean forceReparenting) {
Tab tab = getActivityTab();
if (tab == null) return false;
@@ -798,10 +793,6 @@ public class CustomTabActivity extends ChromeActivity {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.putExtra(ChromeLauncherActivity.EXTRA_IS_ALLOWED_TO_RETURN_TO_PARENT, false);
- if (ChromeFeatureList.isEnabled("ReadItLaterInMenu")) {
- // In this trial both "open in chrome" and "read it later" should target Chrome.
- intent.setPackage(getPackageName());
- }
boolean willChromeHandleIntent = getIntentDataProvider().isOpenedByChrome();
StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();
@@ -824,8 +815,7 @@ public class CustomTabActivity extends ChromeActivity {
};
mMainTab = null;
- tab.detachAndStartReparenting(intent, startActivityOptions, finalizeCallback,
- stayInChrome);
+ tab.detachAndStartReparenting(intent, startActivityOptions, finalizeCallback);
} else {
// Temporarily allowing disk access while fixing. TODO: http://crbug.com/581860
StrictMode.allowThreadDiskReads();

Powered by Google App Engine
This is Rietveld 408576698