Clear cache storage data (#12546)

This commit is contained in:
Zhuo Lu 2018-04-13 10:03:16 -07:00 committed by Shelley Vohr
parent ad2baccefa
commit a0cac05555
2 changed files with 3 additions and 1 deletions

View file

@ -94,6 +94,8 @@ uint32_t GetStorageMask(const std::vector<std::string>& storage_types) {
storage_mask |= StoragePartition::REMOVE_DATA_MASK_WEBSQL;
else if (type == "serviceworkers")
storage_mask |= StoragePartition::REMOVE_DATA_MASK_SERVICE_WORKERS;
else if (type == "cachestorage")
storage_mask |= StoragePartition::REMOVE_DATA_MASK_CACHE_STORAGE;
}
return storage_mask;
}

View file

@ -113,7 +113,7 @@ Clears the sessions HTTP cache.
`scheme://host:port`.
* `storages` String[] (optional) - The types of storages to clear, can contain:
`appcache`, `cookies`, `filesystem`, `indexdb`, `localstorage`,
`shadercache`, `websql`, `serviceworkers`.
`shadercache`, `websql`, `serviceworkers`, `cachestorage`.
* `quotas` String[] (optional) - The types of quotas to clear, can contain:
`temporary`, `persistent`, `syncable`.
* `callback` Function (optional) - Called when operation is done.