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

Unified Diff: chrome/browser/android/preferences/pref_service_bridge.cc

Issue 2682863002: [Android] Explicitly request all needed runtime permissions. (Closed)
Patch Set: Rebase Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/preferences/pref_service_bridge.cc
diff --git a/chrome/browser/android/preferences/pref_service_bridge.cc b/chrome/browser/android/preferences/pref_service_bridge.cc
index 42c432441ab3beb9094ee8c8d2c8e67e660e1724..c18908ba2218e429fcbe42b2674980dfde12c632 100644
--- a/chrome/browser/android/preferences/pref_service_bridge.cc
+++ b/chrome/browser/android/preferences/pref_service_bridge.cc
@@ -1223,16 +1223,15 @@ void PrefServiceBridge::PrependToAcceptLanguagesIfNecessary(
}
// static
-std::string PrefServiceBridge::GetAndroidPermissionForContentSetting(
- ContentSettingsType content_type) {
+void PrefServiceBridge::GetAndroidPermissionsForContentSetting(
+ ContentSettingsType content_type,
+ std::vector<std::string>* out) {
JNIEnv* env = AttachCurrentThread();
- base::android::ScopedJavaLocalRef<jstring> android_permission =
- Java_PrefServiceBridge_getAndroidPermissionForContentSetting(
- env, content_type);
- if (android_permission.is_null())
- return std::string();
-
- return ConvertJavaStringToUTF8(android_permission);
+ base::android::AppendJavaStringArrayToStringVector(
+ env, Java_PrefServiceBridge_getAndroidPermissionsForContentSetting(
+ env, content_type)
+ .obj(),
+ out);
}
static void SetSupervisedUserId(JNIEnv* env,

Powered by Google App Engine
This is Rietveld 408576698