| Index: content/public/android/java/src/org/chromium/content/browser/ContentSettings.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java b/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java
|
| index 3ccf1f1a48eb6872c6b372967cf0870402ba49d7..47e4a6b8e68bd36818c9d36812e19e9c52252405 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java
|
| @@ -78,6 +78,8 @@ public class ContentSettings {
|
| private boolean mJavaScriptCanOpenWindowsAutomatically = false;
|
| private boolean mSupportMultipleWindows = false;
|
| private PluginState mPluginState = PluginState.OFF;
|
| + private boolean mAppCacheEnabled = false;
|
| + private String mAppCachePath = null;
|
| private boolean mDomStorageEnabled = false;
|
|
|
| // Not accessed by the native side.
|
| @@ -919,6 +921,45 @@ public class ContentSettings {
|
| }
|
|
|
| /**
|
| + * Sets whether the Application Caches API should be enabled. The default
|
| + * is false. Note that in order for the Application Caches API to be
|
| + * enabled, a valid database path must also be supplied to
|
| + * {@link #setAppCachePath}.
|
| + *
|
| + * @param flag true if the WebView should enable Application Caches
|
| + */
|
| + public void setAppCacheEnabled(boolean flag) {
|
| + assert mCanModifySettings;
|
| + synchronized (mContentSettingsLock) {
|
| + if (mAppCacheEnabled != flag) {
|
| + mAppCacheEnabled = flag;
|
| + mEventHandler.syncSettingsLocked();
|
| + }
|
| + }
|
| + }
|
| +
|
| + /**
|
| + * Sets the path to the Application Caches files. In order for the
|
| + * Application Caches API to be enabled, this method must be called with a
|
| + * path to which the application can write. This method should only be
|
| + * called once: repeated calls are ignored.
|
| + *
|
| + * @param appCachePath a String path to the directory containing
|
| + * Application Caches files.
|
| + * @see setAppCacheEnabled
|
| + */
|
| + public void setAppCachePath(String path) {
|
| + assert mCanModifySettings;
|
| + synchronized (mContentSettingsLock) {
|
| + // AppCachePath can only be set once.
|
| + if (mAppCachePath == null && path != null && !path.isEmpty()) {
|
| + mAppCachePath = path;
|
| + mEventHandler.syncSettingsLocked();
|
| + }
|
| + }
|
| + }
|
| +
|
| + /**
|
| * Sets whether the DOM storage API is enabled. The default value is false.
|
| *
|
| * @param flag true if the ContentView should use the DOM storage API
|
|
|