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

Side by Side Diff: components/cronet/android/java/src/org/chromium/net/HistogramManager.java

Issue 890893006: [Cronet] HistogramManager now ensures that StatisticsRecorder is initialized. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync Created 5 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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.net; 5 package org.chromium.net;
6 6
7 import org.chromium.base.JNINamespace; 7 import org.chromium.base.JNINamespace;
8 8
9 /** 9 /**
10 * Controls UMA histograms. 10 * Controls UMA histograms.
11 */ 11 */
12 @JNINamespace("cronet") 12 @JNINamespace("cronet")
13 public final class HistogramManager { 13 public final class HistogramManager {
14 public HistogramManager() { 14 public HistogramManager() {
15 nativeEnsureInitialized();
15 } 16 }
16 17
17 /** 18 /**
18 * Get histogram deltas serialized as protobuf. 19 * Get histogram deltas serialized as protobuf.
19 */ 20 */
20 public byte[] getHistogramDeltas() { 21 public byte[] getHistogramDeltas() {
21 return nativeGetHistogramDeltas(); 22 return nativeGetHistogramDeltas();
22 } 23 }
23 24
24 private native byte[] nativeGetHistogramDeltas(); 25 private native byte[] nativeGetHistogramDeltas();
26
27 private native void nativeEnsureInitialized();
25 } 28 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698