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

Side by Side Diff: chrome/browser/android/preferences/pref_service_bridge.cc

Issue 1452603002: Supervised user web restrictions content provider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to comments Created 5 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
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 "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 8
9 #include "base/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 ContentSettingsType content_type) { 935 ContentSettingsType content_type) {
936 JNIEnv* env = AttachCurrentThread(); 936 JNIEnv* env = AttachCurrentThread();
937 base::android::ScopedJavaLocalRef<jstring> android_permission = 937 base::android::ScopedJavaLocalRef<jstring> android_permission =
938 Java_PrefServiceBridge_getAndroidPermissionForContentSetting( 938 Java_PrefServiceBridge_getAndroidPermissionForContentSetting(
939 env, content_type); 939 env, content_type);
940 if (android_permission.is_null()) 940 if (android_permission.is_null())
941 return std::string(); 941 return std::string();
942 942
943 return ConvertJavaStringToUTF8(android_permission); 943 return ConvertJavaStringToUTF8(android_permission);
944 } 944 }
945
946 static void SetSupervisedUserId(JNIEnv* env,
947 const JavaParamRef<jobject>& obj,
948 const JavaParamRef<jstring>& pref) {
949 GetPrefService()->SetString(prefs::kSupervisedUserId,
950 ConvertJavaStringToUTF8(env, pref));
951 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698