Skip to content

Commit 00dec20

Browse files
author
Maura Winstanley
committed
update idl
1 parent 22ab127 commit 00dec20

1 file changed

Lines changed: 30 additions & 32 deletions

File tree

specs/ClearBrowsingData.md

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
11
# Background
22
The WebView2 team has been asked for an API to allow end developers to clear the browsing data that is stored in the User Data Folder. Developers want to be able to clear data between each of their customers, clear the data folder to clear space, and to clear data on the fly.
3-
Currently users can delete the User Data Folder clear this data. This has a few drawbacks: it removes the user data folder instead of specific parts which incurs performance costs later on, the webview must be shutdown fully and then re-initialized, and deleting the User Data Folder is a complex API to call.
4-
We are creating an api that will allow developers to clear the browsing data programtically in which the developer can specify the data type to clear.
3+
Currently users can delete the entire User Data Folder to clear this data. This has a few drawbacks: it removes the user data folder instead of specific parts which incurs performance costs later on, the webview must be shutdown fully and then re-initialized, and deleting the User Data Folder is a complex API to call.
4+
We are creating an API that will allow developers to clear the browsing data programtically in which the developer can specify the data kind to clear.
55

66
In this document we describe the updated API. We'd appreciate your feedback.
77

88

99
# Description
10-
The clear browsing data api is an asynchronous api that clears data based on a browsing data kind.
10+
The clear browsing data API is an asynchronous API.
1111
The browsing data kinds that are supported are as follows. These data kinds follow a hierarchical structure in which nested bullet points are included in their parent bullet point's data kind.
1212

13-
Ex: Dom storage is encompassed in site data which is encompassed in the profile data. Each of the following bullets correspond to a COREWEBVIE2_BROWSING_DATA_KIND unless otherwise specified.
13+
Ex: Dom storage is encompassed in site data which is encompassed in the profile data. Each of the following bullets correspond to a COREWEBVIEW2_BROWSING_DATA_KIND unless otherwise specified.
1414

1515
* Profile
1616
* Site Data
1717
* Dom Storage
18-
* App cache
19-
* File systems
18+
* App Cache
19+
* File Systems
2020
* Indexddb
21-
* Local storage
21+
* Local Storage
2222
* Web SQL
23-
* Cache storage
24-
* Embedder dom storage (this api does not support this specific data kind but this is included in the dom storage data kind)
25-
* Background fetch (this api does not support this specific data kind but this is included in the dom storage data kind)
23+
* Cache Storage
24+
* Embedder Dom Storage (this API does not support this specific data kind but this is included in the dom storage data kind)
25+
* Background Fetch (this API does not support this specific data kind but this is included in the dom storage data kind)
2626
* Cookies
27-
* Media licenses
28-
* Plugin data
29-
* Site usage
30-
* Durable permissions
31-
* External protocols
32-
* Isolated origins
33-
* Trust tokens
34-
* Conversions data
35-
* Http cache
36-
* Download history
37-
* General autofill
38-
* Password autofill
27+
* Media Licenses
28+
* Plugin Data
29+
* Site Usage
30+
* Durable Permissions
31+
* External Protocols
32+
* Isolated Origins
33+
* Trust Tokens
34+
* Conversions Data
35+
* Http Cache
36+
* Download History
37+
* General Autofill
38+
* Password Autofill
3939
* Bookmarks
4040
* Settings
41-
* Content settings
42-
* Local custom dictionary
41+
* Content Settings
42+
* Local Custom Dictionary
4343

4444

4545
# Examples
@@ -49,7 +49,7 @@ Ex: Dom storage is encompassed in site data which is encompassed in the profile
4949
/// Function to clear the password form data
5050
bool EnvironmentComponent::ClearPasswordAutofillData()
5151
{
52-
wil::com_ptr<ICoreWebView2Environment2> environment;
52+
wil::com_ptr<ICoreWebView2Environment5> environment;
5353
webView->get_Environment(&environment);
5454
CHECK_FAILURE(environment->ClearBrowsingData(COREWEBVIEW2_BROWSING_DATA_KIND_PASSWORD_AUTOFILL,
5555
Callback<ICoreWebView2ClearBrowsingDataHandler>(
@@ -97,7 +97,7 @@ interface ICoreWebView2Environment5
9797
interface ICoreWebView2ClearBrowsingDataCompletedHandler;
9898
9999
/// Specifies the datatype for the
100-
/// `ICoreWebView2StagingEnvironment2::ClearBrowsingData` method.
100+
/// `ICoreWebView2Environment5::ClearBrowsingData` method.
101101
[v1_enum]
102102
typedef enum COREWEBVIEW2_BROWSING_DATA_KIND {
103103
/// Specifies app cache data.
@@ -163,7 +163,7 @@ typedef enum COREWEBVIEW2_BROWSING_DATA_KIND {
163163
/// COREWEBVIEW2_BROWSING_DATA_KIND_CONVERSIONS. If on an android OS, site data also includes web app data.
164164
COREWEBVIEW2_BROWSING_DATA_KIND_SITE = 0x17,
165165
166-
/// Specifies content in in the HTTP cache including images and other files.
166+
/// Specifies content in the HTTP cache including images and other files.
167167
COREWEBVIEW2_BROWSING_DATA_KIND_HTTP_CACHE = 0x18,
168168
169169
/// Specifies download history data.
@@ -206,11 +206,9 @@ typedef enum COREWEBVIEW2_BROWSING_DATA_KIND {
206206
207207
[uuid(4ecfcb16-dd09-4464-9a71-fd8e2d3ac0a2), object, pointer_default(unique)]
208208
interface ICoreWebView2SEnvironment5 : ICoreWebView2Environment {
209-
/// Clear browsing data based on a specific data type and time duration. Specify the
210-
/// data type with the `dataType` parameter. The `start_time` parameter specifies
211-
/// the beginning time to clear the data and the `end_time` parameter specifies
212-
/// the ending time to stop clearing the data.
213-
/// The time parameters are the number of seconds since the UNIX epoch.
209+
/// Clear browsing data based on a specific data type. The completed handler
210+
/// will be invoked when the browsing data has been cleared and will indicate
211+
/// if the specified data was properly cleared.
214212
HRESULT ClearBrowsingData(
215213
[in] COREWEBVIEW2_BROWSING_DATA_KIND dataKind,
216214
[in] ICoreWebView2ClearBrowsingDataCompletedHandler *handler);

0 commit comments

Comments
 (0)