| 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
|
| index 09e0b42750c80da05510fb76c78bc5c95e3c6e21..e5e7690cbefbe0fda5f53ddfdfa3011831a6ef1d 100644
|
| --- a/android_webview/java/src/org/chromium/android_webview/AwMetricsLogUploader.java
|
| +++ b/android_webview/java/src/org/chromium/android_webview/AwMetricsLogUploader.java
|
| @@ -14,8 +14,9 @@ import org.chromium.base.annotations.JNINamespace;
|
| 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);
|
| + // This relies on WebViewChromiumFactoryProvider having already created the
|
| + // PlatformServiceBridge. This is guaranteed because metrics won't start until the
|
| + // PlatformServiceBridge.queryMetricsSetting() callback fires.
|
| + PlatformServiceBridge.getInstance().logMetrics(data);
|
| }
|
| }
|
|
|