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

Side by Side Diff: net/android/traffic_stats.h

Issue 2146753002: Android: Remove unneeded RegisterNatives() calls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android: Don't require RegisterNatives if there are none Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef NET_ANDROID_TRAFFIC_STATS_H_ 5 #ifndef NET_ANDROID_TRAFFIC_STATS_H_
6 #define NET_ANDROID_TRAFFIC_STATS_H_ 6 #define NET_ANDROID_TRAFFIC_STATS_H_
7 7
8 // This file provides functions that interact with TrafficStats APIs that are 8 // This file provides functions that interact with TrafficStats APIs that are
9 // provided on Android. 9 // provided on Android.
10 10
11 #include <jni.h> 11 #include <jni.h>
pauljensen 2017/04/13 11:26:57 This is unused now.
12 #include <stdint.h> 12 #include <stdint.h>
13 13
14 #include "net/base/net_export.h" 14 #include "net/base/net_export.h"
15 15
16 namespace net { 16 namespace net {
17 17
18 namespace android { 18 namespace android {
19 19
20 namespace traffic_stats { 20 namespace traffic_stats {
21 21
(...skipping 18 matching lines...) Expand all
40 // and UDP usage. |bytes| must not be nullptr. 40 // and UDP usage. |bytes| must not be nullptr.
41 NET_EXPORT bool GetCurrentUidTxBytes(int64_t* bytes); 41 NET_EXPORT bool GetCurrentUidTxBytes(int64_t* bytes);
42 42
43 // Returns true if the number of bytes attributed to caller's UID since device 43 // Returns true if the number of bytes attributed to caller's UID since device
44 // boot are available and sets |*bytes| to that value. Counts packets across 44 // boot are available and sets |*bytes| to that value. Counts packets across
45 // all network interfaces, and always increases monotonically since device 45 // all network interfaces, and always increases monotonically since device
46 // boot. Statistics are measured at the network layer, so they include both TCP 46 // boot. Statistics are measured at the network layer, so they include both TCP
47 // and UDP usage. |bytes| must not be nullptr. 47 // and UDP usage. |bytes| must not be nullptr.
48 NET_EXPORT bool GetCurrentUidRxBytes(int64_t* bytes); 48 NET_EXPORT bool GetCurrentUidRxBytes(int64_t* bytes);
49 49
50 bool Register(JNIEnv* env);
51
52 } // namespace traffic_stats 50 } // namespace traffic_stats
53 51
54 } // namespace android 52 } // namespace android
55 53
56 } // namespace net 54 } // namespace net
57 55
58 #endif // NET_ANDROID_TRAFFIC_STATS_H_ 56 #endif // NET_ANDROID_TRAFFIC_STATS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698