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

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);
+ }
pkotwicz 2017/05/05 21:05:43 Can we query the source from WebappDataStorage her
Xi Han 2017/05/08 20:55:28 If we query the source here, we could potentially
pkotwicz 2017/05/09 18:37:36 - I think that the launch metrics are recorded eac
Xi Han 2017/05/10 20:49:58 Yes, we would check WebappDataStorage here. Update
Intent launchIntent = createWebappLaunchIntent(webappInfo, webappSource, validWebApk);
startActivity(launchIntent);
return;

Powered by Google App Engine
This is Rietveld 408576698