| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
non owner lgtm.
I am not sure this is the valid way to set DB filename. Let me delegate the check to the owner.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// 3. Clear data with a filter (should be a no-op / skip because DPO doesn't
// support selective filter):Is this ok and documented somewhere? (not really sure how these types of privacy-related deletions should work)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// 3. Clear data with a filter (should be a no-op / skip because DPO doesn't
// support selective filter):Is this ok and documented somewhere? (not really sure how these types of privacy-related deletions should work)
Done. We should support filters. I misunderstood how we're using filters to clear data. Added ClearDataWithFilter() and updated the test.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
for (const auto& origin : cached_policies_) {Because `cached_policies_` might be empty (or incomplete) while `!loaded_` is true, iterating over it won't catch origins that are still being loaded from the database.
If a filter matches an origin that is in the middle of loading:
1. It won't be found in `cached_policies_`.
2. It won't be added to `to_remove`.
3. It won't be added to `modified_during_load_`.
4. When `OnPoliciesLoadedOnUISequence` finally runs, it will incorrectly insert the origin into `cached_policies_` because it doesn't know it was supposed to be filtered out (even though the database deletion task will correctly delete it from disk).
To fix this race condition, you'll need to keep track of filters applied during load (e.g., in a `std::vector<OriginMatcherFunction> pending_filters_` member) when `!loaded_` is true. Then, in `OnPoliciesLoadedOnUISequence`, apply these pending filters to the `loaded` vector to drop matching origins before inserting the rest into `cached_policies_`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Because `cached_policies_` might be empty (or incomplete) while `!loaded_` is true, iterating over it won't catch origins that are still being loaded from the database.
If a filter matches an origin that is in the middle of loading:
1. It won't be found in `cached_policies_`.
2. It won't be added to `to_remove`.
3. It won't be added to `modified_during_load_`.
4. When `OnPoliciesLoadedOnUISequence` finally runs, it will incorrectly insert the origin into `cached_policies_` because it doesn't know it was supposed to be filtered out (even though the database deletion task will correctly delete it from disk).To fix this race condition, you'll need to keep track of filters applied during load (e.g., in a `std::vector<OriginMatcherFunction> pending_filters_` member) when `!loaded_` is true. Then, in `OnPoliciesLoadedOnUISequence`, apply these pending filters to the `loaded` vector to drop matching origins before inserting the rest into `cached_policies_`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
dullweber: Could you give an owner review to t/m/h/m/h/enums.xml? Thank you!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |