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

Side by Side Diff: webrtc/sdk/android/src/jni/androidhistogram_jni.cc

Issue 2547483003: Move /webrtc/api/android files to /webrtc/sdk/android (Closed)
Patch Set: Move to api folder under Android instead of src Created 4 years 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
« no previous file with comments | « webrtc/sdk/android/src/jni/OWNERS ('k') | webrtc/sdk/android/src/jni/androidmediacodeccommon.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2016 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include <map> 11 #include <map>
12 #include <memory> 12 #include <memory>
13 13
14 #include "webrtc/api/android/jni/classreferenceholder.h" 14 #include "webrtc/sdk/android/src/jni/classreferenceholder.h"
15 #include "webrtc/api/android/jni/jni_helpers.h" 15 #include "webrtc/sdk/android/src/jni/jni_helpers.h"
16 #include "webrtc/api/android/jni/native_handle_impl.h" 16 #include "webrtc/sdk/android/src/jni/native_handle_impl.h"
17 #include "webrtc/system_wrappers/include/metrics.h" 17 #include "webrtc/system_wrappers/include/metrics.h"
18 18
19 // Enables collection of native histograms and creating them. 19 // Enables collection of native histograms and creating them.
20 namespace webrtc_jni { 20 namespace webrtc_jni {
21 21
22 JOW(jlong, Histogram_nativeCreateCounts) 22 JOW(jlong, Histogram_nativeCreateCounts)
23 (JNIEnv* jni, jclass, jstring j_name, jint min, jint max, jint buckets) { 23 (JNIEnv* jni, jclass, jstring j_name, jint min, jint max, jint buckets) {
24 std::string name = JavaToStdString(jni, j_name); 24 std::string name = JavaToStdString(jni, j_name);
25 return jlongFromPointer( 25 return jlongFromPointer(
26 webrtc::metrics::HistogramFactoryGetCounts(name, min, max, buckets)); 26 webrtc::metrics::HistogramFactoryGetCounts(name, min, max, buckets));
27 } 27 }
28 28
29 JOW(jlong, Histogram_nativeCreateEnumeration) 29 JOW(jlong, Histogram_nativeCreateEnumeration)
30 (JNIEnv* jni, jclass, jstring j_name, jint max) { 30 (JNIEnv* jni, jclass, jstring j_name, jint max) {
31 std::string name = JavaToStdString(jni, j_name); 31 std::string name = JavaToStdString(jni, j_name);
32 return jlongFromPointer( 32 return jlongFromPointer(
33 webrtc::metrics::HistogramFactoryGetEnumeration(name, max)); 33 webrtc::metrics::HistogramFactoryGetEnumeration(name, max));
34 } 34 }
35 35
36 JOW(void, Histogram_nativeAddSample) 36 JOW(void, Histogram_nativeAddSample)
37 (JNIEnv* jni, jclass, jlong histogram, jint sample) { 37 (JNIEnv* jni, jclass, jlong histogram, jint sample) {
38 if (histogram) { 38 if (histogram) {
39 HistogramAdd(reinterpret_cast<webrtc::metrics::Histogram*>(histogram), 39 HistogramAdd(reinterpret_cast<webrtc::metrics::Histogram*>(histogram),
40 sample); 40 sample);
41 } 41 }
42 } 42 }
43 43
44 } // namespace webrtc_jni 44 } // namespace webrtc_jni
OLDNEW
« no previous file with comments | « webrtc/sdk/android/src/jni/OWNERS ('k') | webrtc/sdk/android/src/jni/androidmediacodeccommon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698