Merge branch 'honeycomb-plus-aosp' of ssh://android-git:29418/platform/frameworks/base into honeycomb-plus-aosp

This commit is contained in:
Nick Pelly
2011-01-25 10:03:46 -08:00
committed by Android Git Automerger

View File

@@ -75,6 +75,9 @@ public final class WebStorage {
private Handler mHandler = null; private Handler mHandler = null;
private Handler mUIHandler = null; private Handler mUIHandler = null;
/**
* Class containing the HTML5 database quota and usage for an origin.
*/
public static class Origin { public static class Origin {
private String mOrigin = null; private String mOrigin = null;
private long mQuota = 0; private long mQuota = 0;
@@ -95,14 +98,30 @@ public final class WebStorage {
mOrigin = origin; 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() { public String getOrigin() {
return mOrigin; return mOrigin;
} }
/**
* Returns the quota for this origin's HTML5 database.
* @return The quota in bytes.
*/
public long getQuota() { public long getQuota() {
return mQuota; return mQuota;
} }
/**
* Returns the usage for this origin's HTML5 database.
* @return The usage in bytes.
*/
public long getUsage() { public long getUsage() {
return mUsage; 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) { public void getOrigins(ValueCallback<Map> callback) {
if (callback != null) { if (callback != null) {