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

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

Issue 1552333002: Resubmit Supervised user web restrictions content provider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Manual rebase to fix merge problem Created 4 years, 11 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 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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698