summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/WebSettings.java
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2009-08-21 13:16:27 +0100
committerSteve Block <steveblock@google.com>2009-08-24 11:59:42 +0100
commit9d3273f62288fa54536a3928383588398ca2d029 (patch)
treeca9cbb07fc9eca7a078e7fa547f342da2dd22a46 /core/java/android/webkit/WebSettings.java
parent8a2000df6d32f4e5df3073753055800a9363a3a5 (diff)
Java-side changes to persist Geolocation permissions between browser sessions.
This fixes bug http://b/issue?id=2054365.
Diffstat (limited to 'core/java/android/webkit/WebSettings.java')
-rw-r--r--core/java/android/webkit/WebSettings.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index 4bdd488269bc..e8b2702f5bc5 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -172,6 +172,7 @@ public class WebSettings {
private long mAppCacheMaxSize = Long.MAX_VALUE;
private String mAppCachePath = "";
private String mDatabasePath = "";
+ private String mGeolocationDatabasePath = "";
// Don't need to synchronize the get/set methods as they
// are basic types, also none of these values are used in
// native WebCore code.
@@ -978,6 +979,21 @@ public class WebSettings {
}
/**
+ * Set the path where the Geolocation permissions database should be saved.
+ * This will update WebCore when the Sync runs in the C++ side.
+ * @param databasePath String path to the directory where the Geolocation
+ * permissions database should be saved. May be the empty string but
+ * should never be null.
+ * @hide pending api council approval
+ */
+ public synchronized void setGeolocationDatabasePath(String databasePath) {
+ if (databasePath != null && !databasePath.equals(mDatabasePath)) {
+ mGeolocationDatabasePath = databasePath;
+ postSync();
+ }
+ }
+
+ /**
* Tell the WebView to enable Application Caches API.
* @param flag True if the WebView should enable Application Caches.
* @hide pending api council approval