Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b632adfa authored by Selim Gurun's avatar Selim Gurun
Browse files

Update documentation to clarify AppCache usage

Bug: 5869022
Change-Id: I46abecfb0e8975cc924458f444f95cdabaa3f712
parent 28b7809e
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1005,8 +1005,11 @@ public abstract class WebSettings {
    }

    /**
     * Sets the maximum size for the Application Caches content. The default is
     * {@link Long#MAX_VALUE}.
     * Sets the maximum size for the Application Cache content. The passed size
     * will be rounded to the nearest value that the database can support, so
     * this should be viewed as a guide, not a hard limit. Setting the
     * size to a value less than current database size does not cause the
     * database to be trimmed. The default size is {@link Long.MAX_VALUE}.
     *
     * @param appCacheMaxSize the maximum size in bytes
     */
+12 −6
Original line number Diff line number Diff line
@@ -23,17 +23,22 @@ import java.util.Map;
 * {@link WebView}. It manages the Application Cache API, the Web SQL Database
 * API and the HTML5 Web Storage API.
 *
 * The Web SQL Database API provides storage which is private to a given
 * origin, where an origin comprises the host, scheme and port of a URI.
 * Similarly, use of the Application Cache API can be attributed to an origin.
 * This class provides access to the storage use and quotas for these APIs for
 * a given origin. Origins are represented using {@link WebStorage.Origin}.
 * The Application Cache API provides a mechanism to create and maintain an
 * application cache to power offline Web applications. Use of the Application
 * Cache API can be attributed to an origin {@link WebStorage.Origin}, however
 * it is not possible to set per-origin quotas. Note that there can be only
 * one application cache per application.
 *
 * The Web SQL Database API provides storage which is private to a given origin.
 * Similar to the Application Cache, use of the Web SQL Database can be attributed
 * to an origin. It is also possible to set per-origin quotas.
 */
public class WebStorage {

    /**
     * Encapsulates a callback function which is used to provide a new quota
     * for a JavaScript storage API. See
     * for a JavaScript storage API.
     * See
     * {@link WebChromeClient#onExceededDatabaseQuota} and
     * {@link WebChromeClient#onReachedMaxAppCacheSize}.
     */
@@ -54,6 +59,7 @@ public class WebStorage {
    /**
     * This class encapsulates information about the amount of storage
     * currently used by an origin for the JavaScript storage APIs.
     * An origin comprises the host, scheme and port of a URI.
     * See {@link WebStorage} for details.
     */
    public static class Origin {