| OLD | NEW |
| 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 "chrome/browser/android/preferences/pref_service_bridge.h" | 5 #include "chrome/browser/android/preferences/pref_service_bridge.h" |
| 6 | 6 |
| 7 #include <jni.h> | 7 #include <jni.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/android/build_info.h" | 10 #include "base/android/build_info.h" |
| (...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 947 ContentSettingsType content_type) { | 947 ContentSettingsType content_type) { |
| 948 JNIEnv* env = AttachCurrentThread(); | 948 JNIEnv* env = AttachCurrentThread(); |
| 949 base::android::ScopedJavaLocalRef<jstring> android_permission = | 949 base::android::ScopedJavaLocalRef<jstring> android_permission = |
| 950 Java_PrefServiceBridge_getAndroidPermissionForContentSetting( | 950 Java_PrefServiceBridge_getAndroidPermissionForContentSetting( |
| 951 env, content_type); | 951 env, content_type); |
| 952 if (android_permission.is_null()) | 952 if (android_permission.is_null()) |
| 953 return std::string(); | 953 return std::string(); |
| 954 | 954 |
| 955 return ConvertJavaStringToUTF8(android_permission); | 955 return ConvertJavaStringToUTF8(android_permission); |
| 956 } | 956 } |
| 957 |
| 958 static void SetSupervisedUserId(JNIEnv* env, |
| 959 const JavaParamRef<jobject>& obj, |
| 960 const JavaParamRef<jstring>& pref) { |
| 961 GetPrefService()->SetString(prefs::kSupervisedUserId, |
| 962 ConvertJavaStringToUTF8(env, pref)); |
| 963 } |
| OLD | NEW |