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

Unified Diff: content/browser/android/content_settings.cc

Issue 10827274: [Android] Implement WebSettings APIs for FileURL resource access conrol (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/ContentSettings.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/ContentSettings.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698