Skip to content

Commit c8c4a0b

Browse files
author
Maura Winstanley
committed
add more desc to enums
1 parent e757413 commit c8c4a0b

1 file changed

Lines changed: 12 additions & 15 deletions

File tree

specs/ClearBrowsingData.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,30 @@
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 space, and to clear data on the fly.
33

4-
Currently users can delete the entire User Data Folder to clear this data. This has a few drawbacks: it removes the entire 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 entire User Data Folder is a complex process.
4+
Currently developers can delete the entire User Data Folder to clear this data. This has a few drawbacks: it removes the entire 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 entire User Data Folder is a complex process.
55
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.
66

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

99

1010
# Description
1111
The clear browsing data API is an asynchronous API and the data clearing is exposed in two different APIs:
12-
13-
* HRESULT ClearBrowsingData(
12+
```IDL
13+
HRESULT ClearBrowsingData(
1414
[in] uint64 dataKinds,
1515
[in] ICoreWebView2ClearBrowsingDataCompletedHandler *handler);
16-
* HRESULT ClearBrowsingDataInTimeRange(
16+
17+
HRESULT ClearBrowsingDataInTimeRange(
1718
[in] uint64 dataKinds,
1819
[in] double startTime,
1920
[in] double endTime,
2021
[in] ICoreWebView2ClearBrowsingDataCompletedHandler *handler);
22+
```
23+
The first method takes a uint64 parameter that consists of one or more COREWEBVIEW2_BROWSING_DATA_KIND passed in as well as a handler which will indicate if the proper data has been cleared successfully. The handler will respond with one of three results, which indicate that the method was successful, interrupted, or failed. This method clears the data for all time.
2124

22-
The first method takes a uint64 parameter that consists of one or more COREWEBVIEW2_BROWSING_DATA_KIND passed in as well as a handler which will indicate if the proper data has been cleared successfully. This method clears the data for all time.
23-
24-
The second method takes a uint64 for the data kinds and a handler, as well as a start and end time in which the API should clear the corresponding data between. The double time parameters correspond to how many seconds since the UNIX epoch.
25-
26-
The handler will respond with one of three results, which indicate that the method was successful, interrupted, or failed.
27-
25+
The second method takes the same parameters for the dataKinds and handler, as well as a start and end time in which the API should clear the corresponding data between. The double time parameters correspond to how many seconds since the UNIX epoch.
26+
2827
The browsing data kinds that are supported are listed below. These data kinds follow a hierarchical structure in which nested bullet points are included in their parent bullet point's data kind.
29-
3028
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.
3129

3230
* Profile
@@ -83,7 +81,6 @@ bool EnvironmentComponent::ClearAutofillData()
8381

8482
### .NET, WinRT
8583
```c#
86-
webView2Control.NavigationStarting += ClearAutofillData;
8784

8885
private void ClearAutofillData()
8986
{
@@ -129,13 +126,13 @@ typedef enum COREWEBVIEW2_CLEAR_BROWSING_DATA_RESULT_KIND {
129126
/// `ICoreWebView2StagingEnvironment2::ClearBrowsingData` method.
130127
[v1_enum]
131128
typedef enum COREWEBVIEW2_BROWSING_DATA_KIND {
132-
/// Specifies data stored by the AppCache DOM feature.
129+
/// Specifies data stored by the AppCache DOM API.
133130
COREWEBVIEW2_BROWSING_DATA_KIND_APP_CACHE = 1<<0,
134131
135132
/// Specifies file systems stored by the FileSystems DOM API.
136133
COREWEBVIEW2_BROWSING_DATA_KIND_FILE_SYSTEMS = 1<<1,
137134
138-
/// Specifies data stored by the IndexedDB DOM feature.
135+
/// Specifies data stored by the IndexedDB DOM API.
139136
COREWEBVIEW2_BROWSING_DATA_KIND_INDEXED_DB = 1<<2,
140137
141138
/// Specifies data stored by the LocalStorage DOM API.
@@ -145,7 +142,7 @@ typedef enum COREWEBVIEW2_BROWSING_DATA_KIND {
145142
COREWEBVIEW2_BROWSING_DATA_KIND_WEB_SQL = 1<<4,
146143
147144
/// Specifies cache storage which stores the network requests
148-
/// and responses.
145+
/// and responses from the CacheStorage DOM API.
149146
COREWEBVIEW2_BROWSING_DATA_KIND_CACHE_STORAGE = 1<<5,
150147
151148
/// Specifies DOM storage data. This browsing data kind is inclusive

0 commit comments

Comments
 (0)