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

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

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 #include "net/android/traffic_stats.h" 5 #include "net/android/traffic_stats.h"
6 6
7 #include "jni/AndroidTrafficStats_jni.h" 7 #include "jni/AndroidTrafficStats_jni.h"
8 8
9 namespace net { 9 namespace net {
10 10
(...skipping 25 matching lines...) Expand all
36 *bytes = Java_AndroidTrafficStats_getCurrentUidTxBytes(env); 36 *bytes = Java_AndroidTrafficStats_getCurrentUidTxBytes(env);
37 return *bytes != ERROR_NOT_SUPPORTED; 37 return *bytes != ERROR_NOT_SUPPORTED;
38 } 38 }
39 39
40 bool GetCurrentUidRxBytes(int64_t* bytes) { 40 bool GetCurrentUidRxBytes(int64_t* bytes) {
41 JNIEnv* env = base::android::AttachCurrentThread(); 41 JNIEnv* env = base::android::AttachCurrentThread();
42 *bytes = Java_AndroidTrafficStats_getCurrentUidRxBytes(env); 42 *bytes = Java_AndroidTrafficStats_getCurrentUidRxBytes(env);
43 return *bytes != ERROR_NOT_SUPPORTED; 43 return *bytes != ERROR_NOT_SUPPORTED;
44 } 44 }
45 45
46 bool Register(JNIEnv* env) {
47 return RegisterNativesImpl(env);
48 }
49
50 } // namespace traffic_stats 46 } // namespace traffic_stats
51 47
52 } // namespace android 48 } // namespace android
53 49
54 } // namespace net 50 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698