summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-01-24 17:31:39 -0800
committerJohn Reck <jreck@google.com>2011-01-24 17:54:09 -0800
commit9b2a59bdd27cfa45c7bb3b58eb705b35589b7050 (patch)
tree4adde7f61ca9eafb5c869ac8505c78c3904fcdec /core/java/android
parent50d4de21ee6a2ee62c7ad89dfdfd82d1045e7a58 (diff)
downloadframeworks_base-9b2a59bdd27cfa45c7bb3b58eb705b35589b7050.zip
frameworks_base-9b2a59bdd27cfa45c7bb3b58eb705b35589b7050.tar.gz
frameworks_base-9b2a59bdd27cfa45c7bb3b58eb705b35589b7050.tar.bz2
Docs for Origin
Bug: 3370302 Change-Id: I44c8856d3f5e4b5e21c2745c1ef07a30526a1dd0
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/webkit/WebStorage.java22
1 files changed, 21 insertions, 1 deletions
diff --git a/core/java/android/webkit/WebStorage.java b/core/java/android/webkit/WebStorage.java
index 257ed2a..8eb1524 100644
--- a/core/java/android/webkit/WebStorage.java
+++ b/core/java/android/webkit/WebStorage.java
@@ -75,6 +75,9 @@ public final class WebStorage {
private Handler mHandler = null;
private Handler mUIHandler = null;
+ /**
+ * Class containing the HTML5 database quota and usage for an origin.
+ */
public static class Origin {
private String mOrigin = null;
private long mQuota = 0;
@@ -95,14 +98,30 @@ public final class WebStorage {
mOrigin = origin;
}
+ /**
+ * An origin string is created using WebCore::SecurityOrigin::toString().
+ * Note that WebCore::SecurityOrigin uses 0 (which is not printed) for
+ * the port if the port is the default for the protocol. Eg
+ * http://www.google.com and http://www.google.com:80 both record a port
+ * of 0 and hence toString() == 'http://www.google.com' for both.
+ * @return The origin string.
+ */
public String getOrigin() {
return mOrigin;
}
+ /**
+ * Returns the quota for this origin's HTML5 database.
+ * @return The quota in bytes.
+ */
public long getQuota() {
return mQuota;
}
+ /**
+ * Returns the usage for this origin's HTML5 database.
+ * @return The usage in bytes.
+ */
public long getUsage() {
return mUsage;
}
@@ -229,7 +248,8 @@ public final class WebStorage {
*/
/**
- * Returns a list of origins having a database
+ * Returns a list of origins having a database. The Map is of type
+ * Map<String, Origin>.
*/
public void getOrigins(ValueCallback<Map> callback) {
if (callback != null) {