148
edits
Line 103: | Line 103: | ||
= Current Proposal = | = Current Proposal = | ||
* Last modified: | * Last modified: May 27, 2010 | ||
* Author: Julian Reschke (greenbytes) | * Author: Julian Reschke (greenbytes), Dan Witte <dwitte@mozilla.com> | ||
The current proposal is to add a new method, providing the new functionality: | The current proposal is to add a new method, providing the new functionality: | ||
<pre> | <pre> | ||
NPError | NPError NPN_ClearSiteData( | ||
NPP instance, | NPP instance, | ||
PRUint64 flags, | PRUint64 flags, // what type of data to clear | ||
const char* | const char* domain, // limit to domain | ||
PRUInt64 maxAge // max. age of information in seconds | |||
); | ); | ||
</pre> | </pre> | ||
Line 123: | Line 123: | ||
// can't clear by domain/site | // can't clear by domain/site | ||
#define NPERR_LIMITBYSITE_NOT_SUPPORTED (NPERR_BASE + nn) | #define NPERR_LIMITBYSITE_NOT_SUPPORTED (NPERR_BASE + nn) | ||
// malformed 'domain' string | |||
#define NPERR_MALFORMED_DOMAIN (NPERR_BASE + ll) | |||
</pre> | </pre> | ||
Semantics: | |||
* <code>flags</code> is a bitset representing which type(s) of data to clear; <code>0</code> means "clear all types". | |||
* The <code>domain</code> argument is interpreted as follows: | |||
** if a hostname of the form "foo.com", data in the "foo.com" domain and all subdomains should be cleared. In this form, <code>domain</code> must be a normalized ACE-encoded hostname, lowercased; must not contain a trailing dot; must not contain scheme, port, or other such fields; and must contain at least one embedded dot; | |||
** if an IP address (either IPv4 or IPv6), data for that IP should be cleared; | |||
** if <code>NULL</code>, all site-specific data and more generic data on browsing history (for instance, number of sites visited) should be cleared. | |||
* <code>maxAge</code> is the maximum age of data to clear, inclusive, in seconds. If <code>maxAge</code> is <code>0</code>, no data is cleared. If <code>maxAge</code> is the maximum unsigned 64-bit integer, all data is cleared. | |||
= Open Issues = | = Open Issues = |
edits