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

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

Issue 2629573004: Add a chrome://webapks page. (Closed)
Patch Set: Makes the listWebApks method receive a callback on the Java side Created 3 years, 11 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/WebApkInfo.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInfo.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInfo.java
index 50ee188790495b72ce8d43137a0c104d7816a498..f4aea39b2667a8f7bafd123b91658d23d83020a5 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInfo.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInfo.java
@@ -52,10 +52,20 @@ public class WebApkInfo extends WebappInfo {
if (TextUtils.isEmpty(webApkPackageName)) {
return null;
}
-
String url = urlFromIntent(intent);
int source = sourceFromIntent(intent);
+ return create(webApkPackageName, url, source);
+ }
+ /**
+ * Constructs a WebApkInfo from the passed as parameter and <meta-data> in the WebAPK's Android
+ * manifest.
pkotwicz 2017/01/18 02:08:20 Nit: "passed as parameter ..." -> "passed in param
pkotwicz 2017/01/20 16:57:16 ^^^ I think you missed this comment
gonzalon 2017/01/20 19:27:01 Done.
+ *
+ * @param webApkPackageName The package name of the WebAPK.
+ * @param url Url that the WebAPK should navigate to when launched.
+ * @param source Source that the WebAPK was launched from.
+ */
+ public static WebApkInfo create(String webApkPackageName, String url, int source) {
// Unlike non-WebAPK web apps, WebAPK ids are predictable. A malicious actor may send an
// intent with a valid start URL and arbitrary other data. Only use the start URL, the
// package name and the ShortcutSource from the launch intent and extract the remaining data

Powered by Google App Engine
This is Rietveld 408576698