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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/metrics/LaunchMetrics.java

Issue 1129293009: Record whenever an app is launched from the Home screen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | chrome/browser/android/metrics/launch_metrics.cc » ('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/metrics/LaunchMetrics.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/metrics/LaunchMetrics.java b/chrome/android/java/src/org/chromium/chrome/browser/metrics/LaunchMetrics.java
index e1a4e1b5aababdd79cf4f29472a48207532f380d..a95aab54955c1c172841afbb0d80c41bef7d963f 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/metrics/LaunchMetrics.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/metrics/LaunchMetrics.java
@@ -5,6 +5,7 @@
package org.chromium.chrome.browser.metrics;
import org.chromium.base.JNINamespace;
+import org.chromium.content_public.browser.WebContents;
import java.util.ArrayList;
import java.util.List;
@@ -37,17 +38,19 @@ public class LaunchMetrics {
* Calls out to native code to record URLs that have been launched via the Home screen.
* This intermediate step is necessary because Activity.onCreate() may be called when
* the native library has not yet been loaded.
+ * @param webContents WebContents for the current Tab.
*/
- public static void commitLaunchMetrics() {
+ public static void commitLaunchMetrics(WebContents webContents) {
for (String url : sActivityUrls) {
- nativeRecordLaunch(true, url);
+ nativeRecordLaunch(true, url, webContents);
}
for (String url : sTabUrls) {
- nativeRecordLaunch(false, url);
+ nativeRecordLaunch(false, url, webContents);
}
sActivityUrls.clear();
sTabUrls.clear();
}
- private static native void nativeRecordLaunch(boolean standalone, String url);
+ private static native void nativeRecordLaunch(
+ boolean standalone, String url, WebContents webContents);
}
« no previous file with comments | « no previous file | chrome/browser/android/metrics/launch_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698