(cookie)
| 5724 | } |
| 5725 | |
| 5726 | async function removeCookieDirectly(cookie) { |
| 5727 | const details = { |
| 5728 | url: buildCookieRemovalUrl(cookie), |
| 5729 | name: cookie.name, |
| 5730 | }; |
| 5731 | |
| 5732 | if (cookie.storeId) { |
| 5733 | details.storeId = cookie.storeId; |
| 5734 | } |
| 5735 | if (cookie.partitionKey) { |
| 5736 | details.partitionKey = cookie.partitionKey; |
| 5737 | } |
| 5738 | |
| 5739 | try { |
| 5740 | const result = await chrome.cookies.remove(details); |
| 5741 | return Boolean(result); |
| 5742 | } catch (err) { |
| 5743 | console.warn(LOG_PREFIX, '[removeCookieDirectly] failed', { |
| 5744 | domain: cookie?.domain, |
| 5745 | name: cookie?.name, |
| 5746 | message: getErrorMessage(err), |
| 5747 | }); |
| 5748 | return false; |
| 5749 | } |
| 5750 | } |
| 5751 | |
| 5752 | async function runPreStep6CookieCleanup() { |
| 5753 | await addLog( |
no test coverage detected