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

Side by Side Diff: base/android/field_trial_list.cc

Issue 2209993003: Add missing using statements for JNI types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « base/android/content_uri_utils.cc ('k') | base/android/memory_pressure_listener_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "base/android/field_trial_list.h" 5 #include "base/android/field_trial_list.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 8
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
11 #include "jni/FieldTrialList_jni.h" 11 #include "jni/FieldTrialList_jni.h"
12 12
13 using base::android::ConvertJavaStringToUTF8; 13 using base::android::ConvertJavaStringToUTF8;
14 using base::android::ConvertUTF8ToJavaString; 14 using base::android::ConvertUTF8ToJavaString;
15 using base::android::JavaParamRef;
16 using base::android::ScopedJavaLocalRef;
15 17
16 static ScopedJavaLocalRef<jstring> FindFullName( 18 static ScopedJavaLocalRef<jstring> FindFullName(
17 JNIEnv* env, 19 JNIEnv* env,
18 const JavaParamRef<jclass>& clazz, 20 const JavaParamRef<jclass>& clazz,
19 const JavaParamRef<jstring>& jtrial_name) { 21 const JavaParamRef<jstring>& jtrial_name) {
20 std::string trial_name(ConvertJavaStringToUTF8(env, jtrial_name)); 22 std::string trial_name(ConvertJavaStringToUTF8(env, jtrial_name));
21 return ConvertUTF8ToJavaString( 23 return ConvertUTF8ToJavaString(
22 env, base::FieldTrialList::FindFullName(trial_name)); 24 env, base::FieldTrialList::FindFullName(trial_name));
23 } 25 }
24 26
25 static jboolean TrialExists(JNIEnv* env, 27 static jboolean TrialExists(JNIEnv* env,
26 const JavaParamRef<jclass>& clazz, 28 const JavaParamRef<jclass>& clazz,
27 const JavaParamRef<jstring>& jtrial_name) { 29 const JavaParamRef<jstring>& jtrial_name) {
28 std::string trial_name(ConvertJavaStringToUTF8(env, jtrial_name)); 30 std::string trial_name(ConvertJavaStringToUTF8(env, jtrial_name));
29 return base::FieldTrialList::TrialExists(trial_name); 31 return base::FieldTrialList::TrialExists(trial_name);
30 } 32 }
31 33
32 namespace base { 34 namespace base {
33 namespace android { 35 namespace android {
34 36
35 bool RegisterFieldTrialList(JNIEnv* env) { 37 bool RegisterFieldTrialList(JNIEnv* env) {
36 return RegisterNativesImpl(env); 38 return RegisterNativesImpl(env);
37 } 39 }
38 40
39 } // namespace android 41 } // namespace android
40 } // namespace base 42 } // namespace base
OLDNEW
« no previous file with comments | « base/android/content_uri_utils.cc ('k') | base/android/memory_pressure_listener_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698