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

Side by Side Diff: android_webview/java/src/org/chromium/android_webview/AwMetricsLogUploader.java

Issue 2787963003: WebView: Refactor PlatformServiceBridge.getInstance (Closed)
Patch Set: make injectInstance less picky Created 3 years, 8 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 unified diff | Download patch
OLDNEW
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698