| 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 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 #include "chrome/common/pref_names.h" | 33 #include "chrome/common/pref_names.h" |
| 34 #include "chrome/grit/locale_settings.h" | 34 #include "chrome/grit/locale_settings.h" |
| 35 #include "components/content_settings/core/browser/host_content_settings_map.h" | 35 #include "components/content_settings/core/browser/host_content_settings_map.h" |
| 36 #include "components/content_settings/core/common/content_settings.h" | 36 #include "components/content_settings/core/common/content_settings.h" |
| 37 #include "components/content_settings/core/common/content_settings_pattern.h" | 37 #include "components/content_settings/core/common/content_settings_pattern.h" |
| 38 #include "components/content_settings/core/common/pref_names.h" | 38 #include "components/content_settings/core/common/pref_names.h" |
| 39 #include "components/metrics/metrics_pref_names.h" | 39 #include "components/metrics/metrics_pref_names.h" |
| 40 #include "components/password_manager/core/common/password_manager_pref_names.h" | 40 #include "components/password_manager/core/common/password_manager_pref_names.h" |
| 41 #include "components/prefs/pref_service.h" | 41 #include "components/prefs/pref_service.h" |
| 42 #include "components/signin/core/common/signin_pref_names.h" | 42 #include "components/signin/core/common/signin_pref_names.h" |
| 43 #include "components/strings/grit/components_locale_settings.h" |
| 43 #include "components/translate/core/browser/translate_prefs.h" | 44 #include "components/translate/core/browser/translate_prefs.h" |
| 44 #include "components/translate/core/common/translate_pref_names.h" | 45 #include "components/translate/core/common/translate_pref_names.h" |
| 45 #include "components/version_info/version_info.h" | 46 #include "components/version_info/version_info.h" |
| 46 #include "components/web_resource/web_resource_pref_names.h" | 47 #include "components/web_resource/web_resource_pref_names.h" |
| 47 #include "content/public/browser/browser_thread.h" | 48 #include "content/public/browser/browser_thread.h" |
| 48 #include "content/public/browser/user_metrics.h" | 49 #include "content/public/browser/user_metrics.h" |
| 49 #include "jni/PrefServiceBridge_jni.h" | 50 #include "jni/PrefServiceBridge_jni.h" |
| 50 #include "ui/base/l10n/l10n_util.h" | 51 #include "ui/base/l10n/l10n_util.h" |
| 51 | 52 |
| 52 using base::android::AttachCurrentThread; | 53 using base::android::AttachCurrentThread; |
| (...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 | 1016 |
| 1016 return ConvertJavaStringToUTF8(android_permission); | 1017 return ConvertJavaStringToUTF8(android_permission); |
| 1017 } | 1018 } |
| 1018 | 1019 |
| 1019 static void SetSupervisedUserId(JNIEnv* env, | 1020 static void SetSupervisedUserId(JNIEnv* env, |
| 1020 const JavaParamRef<jobject>& obj, | 1021 const JavaParamRef<jobject>& obj, |
| 1021 const JavaParamRef<jstring>& pref) { | 1022 const JavaParamRef<jstring>& pref) { |
| 1022 GetPrefService()->SetString(prefs::kSupervisedUserId, | 1023 GetPrefService()->SetString(prefs::kSupervisedUserId, |
| 1023 ConvertJavaStringToUTF8(env, pref)); | 1024 ConvertJavaStringToUTF8(env, pref)); |
| 1024 } | 1025 } |
| OLD | NEW |