| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.android_webview; | 5 package org.chromium.android_webview; |
| 6 | 6 |
| 7 import org.chromium.base.annotations.CalledByNative; | 7 import org.chromium.base.annotations.CalledByNative; |
| 8 import org.chromium.base.annotations.JNINamespace; | 8 import org.chromium.base.annotations.JNINamespace; |
| 9 | 9 |
| 10 /** | 10 /** |
| 11 * Passes UMA logs from native to PlatformServiceBridge. | 11 * Passes UMA logs from native to PlatformServiceBridge. |
| 12 */ | 12 */ |
| 13 @JNINamespace("android_webview") | 13 @JNINamespace("android_webview") |
| 14 public class AwMetricsLogUploader { | 14 public class AwMetricsLogUploader { |
| 15 @CalledByNative | 15 @CalledByNative |
| 16 public static void uploadLog(byte[] data) { | 16 public static void uploadLog(byte[] data) { |
| 17 // getInstance only needs a Context on the first call. WebViewChromiumFa
ctoryProvider will | 17 PlatformServiceBridge.getInstance().logMetrics(data); |
| 18 // have already called it, so we can pass null here. | |
| 19 PlatformServiceBridge.getInstance(null).logMetrics(data); | |
| 20 } | 18 } |
| 21 } | 19 } |
| OLD | NEW |