diff options
author | mkwst@chromium.org <mkwst@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-14 10:49:48 +0000 |
---|---|---|
committer | mkwst@chromium.org <mkwst@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-14 10:49:48 +0000 |
commit | 8c2dacc41946361371c51beb8996e337cb941c2b (patch) | |
tree | 346806a53a953098b64c4c2ec769dc3a9a76fee7 /chrome/common/extensions/docs/static | |
parent | 353b7c9e897bae04dfe8a1df6744e804ea0bf142 (diff) | |
download | chromium_src-8c2dacc41946361371c51beb8996e337cb941c2b.zip chromium_src-8c2dacc41946361371c51beb8996e337cb941c2b.tar.gz chromium_src-8c2dacc41946361371c51beb8996e337cb941c2b.tar.bz2 |
Reworking the BrowsingData API signature to include an options object.
BUG=113194
TEST=
Review URL: http://codereview.chromium.org/9361027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121872 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/docs/static')
-rw-r--r-- | chrome/common/extensions/docs/static/experimental.browsingData.html | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/chrome/common/extensions/docs/static/experimental.browsingData.html b/chrome/common/extensions/docs/static/experimental.browsingData.html index 7dfaa4e..86e0fc2 100644 --- a/chrome/common/extensions/docs/static/experimental.browsingData.html +++ b/chrome/common/extensions/docs/static/experimental.browsingData.html @@ -29,12 +29,12 @@ <h2 id="usage">Usage</h2> <p> - This API provides a time-based mechanism for clearing a user's browsing data. - Your code should provide a timestamp which indicates the historical date after - which the user's browsing data should be removed. This timestamp is formatted - as the number of milliseconds since the Unix epoch (which can be retrieved - from a JavaScript <code>Date</code> object via the <code>getTime</code> - method). + The simplest use-case for this API is a a time-based mechanism for clearing a + user's browsing data. Your code should provide a timestamp which indicates the + historical date after which the user's browsing data should be removed. This + timestamp is formatted as the number of milliseconds since the Unix epoch + (which can be retrieved from a JavaScript <code>Date</code> object via the + <code>getTime</code> method). </p> <p> @@ -48,7 +48,9 @@ var millisecondsPerWeek = 1000 * 60 * 60 * 24 * 7; var oneWeekAgo = (new Date()).getTime() - millisecondsPerWeek; -chrome.experimental.browsingData.remove(oneWeekAgo, { +chrome.experimental.browsingData.remove({ + "since": oneWeekAgo +}, { "appcache": true, "cache": true, "cookies": true, @@ -77,7 +79,9 @@ chrome.experimental.browsingData.remove(oneWeekAgo, { var millisecondsPerWeek = 1000 * 60 * 60 * 24 * 7; var oneWeekAgo = (new Date()).getTime() - millisecondsPerWeek; -chrome.experimental.browsingData.removeCookies(oneWeekAgo, callback);</pre> +chrome.experimental.browsingData.removeCookies({ + "since": oneWeekAgo +}, callback);</pre> <p class="caution"> <strong>Important</strong>: Removing browsing data involves a good deal of |