Пример кода для background.js вашего расширения:
chrome.cookies.getAll({}, function(cookies) {
var count = cookies.length;
console.log('Найдено Cookie '+count+' шт.');
console.dir(cookies);
for (var n = 0; n < cookies.length; n++) {
var details = {
'name': cookies[n]['name'],
'storeId': cookies[n]['storeId'],
'url': 'https://' + cookies[n]['domain'] + cookies[n]['path']
};
chrome.cookies.remove(details, function(result) {
count--;
if (count === 0) {
console.log('Cookie успешно очищены:');
chrome.cookies.getAll({}, function(cookies) { console.dir(cookies); });
}
});
}
});