I ran into this while investigating the remaining WebView failures, so writing up my findings.
Right now ClearData takes a CookieMatcherFunction which is a net::CookieStore::CookiePredicate. It's used in two places: web_view_guest.cc to delete only persistent or session cookies, and in browsing_data_filter_builder_impl.cc to whitelist/blacklist cookies by domain.
We should serialize these configurations, very rough strawman:
struct CookieDeletionInfo {
// By default, all cookie are deleted.
bool delete_persistent = true;
bool delete_session = true;
// If only a subset of cookies should be deleted, then |whitelist| will true
// for a whitelist, and false for a blacklist. The list is
// |domains_and_ips|.
bool whitelist;
std::set<std::string> domains_and_ips;
};
and pass that struct instead of CookieMatcherFunction.
+CC a few people who might have the bandwidth to look into this
I ran into this while investigating the remaining WebView failures, so writing up my findings.
Right now ClearData takes a CookieMatcherFunction which is a net::CookieStore::CookiePredicate. It's used in two places: web_view_guest.cc to delete only persistent or session cookies, and in browsing_data_filter_builder_impl.cc to whitelist/blacklist cookies by domain.
We should serialize these configurations, very rough strawman:
struct CookieDeletionInfo {
// By default, all cookie are deleted.
bool delete_persistent = true;
bool delete_session = true;
// If only a subset of cookies should be deleted, then |whitelist| will true
// for a whitelist, and false for a blacklist. The list is
// |domains_and_ips|.
bool whitelist;
std::set<std::string> domains_and_ips;
};
and pass that struct instead of CookieMatcherFunction. ClearCookiesOnIOThread in storage_partition_impl.cc would then be removed, as StoragePartitionImpl::DataDeletionHelper::ClearDataOnUIThread can call network::mojom::CookieManager.
+CC a few people who might have the bandwidth to look into this
Comment 1 by jam@chromium.org
, Mar 19 2018