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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java

Issue 1867543002: Enable deep-linking from notifications for recently used web apps on the Android home screen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bulk-webappdatastorage
Patch Set: UI thread strikes again Created 4 years, 8 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/webapps/WebappLauncherActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java
index 0ab0d9dd95c5568afc62e2793e6e559c90b8e8bf..ca8820969e556d875a0cd597a51603fe298ecb51 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java
@@ -14,6 +14,7 @@ import android.util.Base64;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.ApplicationStatus;
import org.chromium.base.Log;
+import org.chromium.chrome.browser.IntentHandler;
import org.chromium.chrome.browser.ShortcutHelper;
import org.chromium.chrome.browser.document.ChromeLauncherActivity;
import org.chromium.chrome.browser.metrics.LaunchMetrics;
@@ -58,7 +59,11 @@ public class WebappLauncherActivity extends Activity {
webappMacString == null ? null : Base64.decode(webappMacString, Base64.DEFAULT);
Intent launchIntent = null;
- if (webappMac != null && WebappAuthenticator.isUrlValid(this, webappUrl, webappMac)) {
+ boolean isTrusted = IntentHandler.wasIntentSenderChrome(intent,
+ ApplicationStatus.getApplicationContext());
gone 2016/04/07 19:10:44 Indentation is wonky here (indent by 8 then 4). W
dominickn 2016/04/08 01:10:45 I just used another variable. Seems a bit nicer th
+ if (isTrusted
+ || (webappMac != null
+ && WebappAuthenticator.isUrlValid(this, webappUrl, webappMac))) {
LaunchMetrics.recordHomeScreenLaunchIntoStandaloneActivity(webappUrl, webappSource);
String activityName = WebappActivity.class.getName();

Powered by Google App Engine
This is Rietveld 408576698