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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java

Issue 2969143002: Fixes redirects to external apps when navigating from PWA. (Closed)
Patch Set: Fix Created 3 years, 5 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java
index 6d995d7ca25420557d31a36522d3e2603a301c3b..bea73b89ba79df354678c041ec58abcb0b88ce46 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java
@@ -133,13 +133,6 @@ public class TabDelegate extends TabCreator {
Intent intent = new Intent(
Intent.ACTION_VIEW, Uri.parse(asyncParams.getLoadUrlParams().getUrl()));
- ComponentName componentName = asyncParams.getComponentName();
- if (componentName == null) {
- intent.setClass(ContextUtils.getApplicationContext(), ChromeLauncherActivity.class);
- } else {
- intent.setComponent(componentName);
- }
-
addAsyncTabExtras(asyncParams, parentId, isChromeUI, assignedTabId, intent);
return intent;
@@ -147,6 +140,13 @@ public class TabDelegate extends TabCreator {
protected final void addAsyncTabExtras(AsyncTabCreationParams asyncParams, int parentId,
boolean isChromeUI, int assignedTabId, Intent intent) {
+ ComponentName componentName = asyncParams.getComponentName();
+ if (componentName == null) {
+ intent.setClass(ContextUtils.getApplicationContext(), ChromeLauncherActivity.class);
+ } else {
+ intent.setComponent(componentName);
+ }
+
Map<String, String> extraHeaders = asyncParams.getLoadUrlParams().getExtraHeaders();
if (extraHeaders != null && !extraHeaders.isEmpty()) {
Bundle bundle = new Bundle();
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698