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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwMetricsLogUploader.java

Issue 2778203003: WebView: Create UMA uploader (Closed)
Patch Set: unimplemnet RegisterAwMetricsLogUploader Created 3 years, 9 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: android_webview/java/src/org/chromium/android_webview/AwMetricsLogUploader.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwMetricsLogUploader.java b/android_webview/java/src/org/chromium/android_webview/AwMetricsLogUploader.java
new file mode 100644
index 0000000000000000000000000000000000000000..09e0b42750c80da05510fb76c78bc5c95e3c6e21
--- /dev/null
+++ b/android_webview/java/src/org/chromium/android_webview/AwMetricsLogUploader.java
@@ -0,0 +1,21 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.android_webview;
+
+import org.chromium.base.annotations.CalledByNative;
+import org.chromium.base.annotations.JNINamespace;
+
+/**
+ * Passes UMA logs from native to PlatformServiceBridge.
+ */
+@JNINamespace("android_webview")
+public class AwMetricsLogUploader {
+ @CalledByNative
+ public static void uploadLog(byte[] data) {
+ // getInstance only needs a Context on the first call. WebViewChromiumFactoryProvider will
+ // have already called it, so we can pass null here.
+ PlatformServiceBridge.getInstance(null).logMetrics(data);
+ }
+}
« no previous file with comments | « android_webview/DEPS ('k') | android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698