Chromium Code Reviews| 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..e374a24bcc3a2955d371e2ee480cdc3c0f76c7cb |
| --- /dev/null |
| +++ b/android_webview/java/src/org/chromium/android_webview/AwMetricsLogUploader.java |
| @@ -0,0 +1,19 @@ |
| +// 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; |
| + |
| +/** |
| + * Passes UMA logs from native to PlatformServiceBridge. |
| + */ |
| +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); |
|
michaelbai
2017/03/29 01:29:55
If you ever want to write a test for this, you wil
paulmiller
2017/03/29 01:59:41
What do you mean, test uploadLog independently fro
michaelbai
2017/03/29 18:04:48
Well, you can wrote test like what you suggested,
paulmiller
2017/03/29 18:33:28
Okay, I'll do a separate patch.
|
| + } |
| +} |