Add setXSSAuditorEnabled support in WebSettings.

Change-Id: I6f74589b28960b91093acf8219a55e98f93b1881
This commit is contained in:
Elliott Slaughter
2010-06-22 11:31:54 -07:00
parent 75d41c96a7
commit 5dc0c8253b
4 changed files with 29 additions and 0 deletions

View File

@@ -184,6 +184,7 @@ public class WebSettings {
private boolean mDomStorageEnabled = false;
private boolean mWorkersEnabled = false; // only affects V8.
private boolean mGeolocationEnabled = true;
private boolean mXSSAuditorEnabled = false;
// HTML5 configuration parameters
private long mAppCacheMaxSize = Long.MAX_VALUE;
private String mAppCachePath = "";
@@ -1233,6 +1234,17 @@ public class WebSettings {
}
}
/**
* Sets whether XSS Auditor is enabled.
* @param flag Whether XSS Auditor should be enabled.
*/
public synchronized void setXSSAuditorEnabled(boolean flag) {
if (mXSSAuditorEnabled != flag) {
mXSSAuditorEnabled = flag;
postSync();
}
}
/**
* Return true if javascript is enabled. <b>Note: The default is false.</b>
* @return True if javascript is enabled.