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

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

Issue 2860193002: Correctly record WebAPK install source for Launch.HomescreenSource (Closed)
Patch Set: Created 3 years, 7 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 254a3c01086eced6705b77be521e2dcd7a7b0e6d..1a054cf089017db7956d2162c9c1365bb8f75501 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
@@ -79,7 +79,11 @@ public class WebappLauncherActivity extends Activity {
// - the intent was sent by Chrome.
if (validWebApk || isValidMacForUrl(webappUrl, webappMac)
|| wasIntentFromChrome(intent)) {
- LaunchMetrics.recordHomeScreenLaunchIntoStandaloneActivity(webappUrl, webappSource);
+ if (!validWebApk) {
+ // We record the launch metrics for WebAPKs in the WebApkActivity. This is because
+ // we can only get the source info from WebappDataStorage, not in the APK.
+ LaunchMetrics.recordHomeScreenLaunchIntoStandaloneActivity(webappUrl, webappSource);
+ }
Intent launchIntent = createWebappLaunchIntent(webappInfo, webappSource, validWebApk);
startActivity(launchIntent);
return;

Powered by Google App Engine
This is Rietveld 408576698