Index: content/browser/android/content_settings.cc |
diff --git a/content/browser/android/content_settings.cc b/content/browser/android/content_settings.cc |
index 5effd5873d0759875c32af9ad26c8fe267e61872..b023f2b1acd3e0621e335c83a5d30c5ff7d08b4d 100644 |
--- a/content/browser/android/content_settings.cc |
+++ b/content/browser/android/content_settings.cc |
@@ -66,6 +66,10 @@ struct ContentSettings::FieldIds { |
GetFieldID(env, clazz, "mLoadsImagesAutomatically", "Z"); |
java_script_enabled = |
GetFieldID(env, clazz, "mJavaScriptEnabled", "Z"); |
+ allow_universal_access_from_file_urls = |
+ GetFieldID(env, clazz, "mAllowUniversalAccessFromFileURLs", "Z"); |
+ allow_file_access_from_file_urls = |
+ GetFieldID(env, clazz, "mAllowFileAccessFromFileURLs", "Z"); |
java_script_can_open_windows_automatically = |
GetFieldID(env, clazz, "mJavaScriptCanOpenWindowsAutomatically", "Z"); |
dom_storage_enabled = |
@@ -87,6 +91,8 @@ struct ContentSettings::FieldIds { |
jfieldID default_fixed_font_size; |
jfieldID load_images_automatically; |
jfieldID java_script_enabled; |
+ jfieldID allow_universal_access_from_file_urls; |
+ jfieldID allow_file_access_from_file_urls; |
jfieldID java_script_can_open_windows_automatically; |
jfieldID dom_storage_enabled; |
}; |
@@ -189,6 +195,18 @@ void ContentSettings::SyncFromNativeImpl() { |
env->SetBooleanField( |
obj, |
+ field_ids_->allow_universal_access_from_file_urls, |
+ prefs.allow_universal_access_from_file_urls); |
+ CheckException(env); |
+ |
+ env->SetBooleanField( |
+ obj, |
+ field_ids_->allow_file_access_from_file_urls, |
+ prefs.allow_file_access_from_file_urls); |
+ CheckException(env); |
+ |
+ env->SetBooleanField( |
+ obj, |
field_ids_->java_script_can_open_windows_automatically, |
prefs.javascript_can_open_windows_automatically); |
CheckException(env); |
@@ -272,6 +290,12 @@ void ContentSettings::SyncToNativeImpl() { |
prefs.javascript_enabled = |
env->GetBooleanField(obj, field_ids_->java_script_enabled); |
+ prefs.allow_universal_access_from_file_urls = env->GetBooleanField( |
+ obj, field_ids_->allow_universal_access_from_file_urls); |
+ |
+ prefs.allow_file_access_from_file_urls = env->GetBooleanField( |
+ obj, field_ids_->allow_file_access_from_file_urls); |
+ |
prefs.javascript_can_open_windows_automatically = env->GetBooleanField( |
obj, field_ids_->java_script_can_open_windows_automatically); |