This repository contains a basic CCleaner extension stub to be installed within Avast Secure Browser (ASB). As a Chromium based browser, ASB supports the Chrome extension framework, making this extension also compatible with Chrome and other Chromium based browsers.
As a very first step, we recommend you read the What are Extensions?, Getting Started Tutorial and Overview pages of the Google Chrome extension documentation as this will help familarise you with the structure of extensions.
Extensions can be loaded in unpacked mode by following these steps in ASB:
- Visit
secure://extensions
(via: Menu -> More Tools -> Extensions). - Enable
Developer mode
by ticking the checkbox in the upper-right corner. - Click on the "Load unpacked extension..." button.
- Select the directory containing the unpacked extension (e.g. src)
Chrome already has a set of extension APIs for cleaning/removing browsing data: chrome.browsingData. We have extended these APIs to provide special cleaning and reporting functionality specifically for our browser:
-
Added a
till
removal option - this has the same format assince
but marks the end timestamp of the cleaning. -
Added
chrome.browsingData.reportCleanResults
function which saves the passed JSON into a temporary file, looks for CCleaner installation path in the registry and executes it with/report
argument pointing to the temporary file. -
Added cleaning results data as an object argument for callback in
chrome.browsingData.remove()
and other remove functions. The format is a dictionary with data types that were requested to be cleaned. Each data type has acount
(i.e. total number of entries) and anentries
array of objects. Inside theentries
array, there ispath
andsize
information. Thepath
may be a URL or some other identifier (e.g.profile:guid
for form data). Thesize
information is represented in bytes and is non-zero only for some data types (e.g.cache
).