#include "chrome/browser/extensions/api/browsing_data/browsing_data_api.h"
#include <string>
#include <utility>
#include "base/functional/bind.h"
#include "base/strings/stringprintf.h"
#include "base/task/thread_pool.h"
#include "chrome/browser/browsing_data/chrome_browsing_data_remover_constants.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/account_reconcilor_factory.h"
#include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/browser/sync/sync_ui_util.h"
#include "chrome/browser/ui/browser.h"
#include "components/browsing_data/content/browsing_data_helper.h"
#include "components/browsing_data/core/pref_names.h"
#include "components/history/core/common/pref_names.h"
#include "components/prefs/pref_service.h"
#include "components/signin/public/identity_manager/identity_manager.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/browsing_data_filter_builder.h"
#include "content/public/browser/browsing_data_remover.h"
#include "extensions/common/error_utils.h"
#include "extensions/common/extension.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
BrowsingDataType;
ClearBrowsingDataTab;
BrowserThread;
namespace {
const int64_t kFilterableDataTypes = …;
static_assert …;
uint64_t MaskForKey(const char* key) { … }
bool IsRemovalPermitted(uint64_t removal_mask, PrefService* prefs) { … }
bool IsSyncRunning(Profile* profile) { … }
}
bool BrowsingDataSettingsFunction::isDataTypeSelected(
BrowsingDataType data_type,
ClearBrowsingDataTab tab) { … }
ExtensionFunction::ResponseAction BrowsingDataSettingsFunction::Run() { … }
void BrowsingDataSettingsFunction::SetDetails(base::Value::Dict* selected_dict,
base::Value::Dict* permitted_dict,
const char* data_type,
bool is_selected) { … }
BrowsingDataRemoverFunction::BrowsingDataRemoverFunction() = default;
void BrowsingDataRemoverFunction::OnBrowsingDataRemoverDone(
uint64_t failed_data_types) { … }
void BrowsingDataRemoverFunction::OnTaskFinished() { … }
ExtensionFunction::ResponseAction BrowsingDataRemoverFunction::Run() { … }
BrowsingDataRemoverFunction::~BrowsingDataRemoverFunction() = default;
bool BrowsingDataRemoverFunction::IsPauseSyncAllowed() { … }
void BrowsingDataRemoverFunction::StartRemoving() { … }
bool BrowsingDataRemoverFunction::ParseOriginTypeMask(
const base::Value::Dict& options,
uint64_t* origin_type_mask) { … }
BrowsingDataRemoverFunction::OriginParsingResult
BrowsingDataRemoverFunction::ParseOrigins(const base::Value::List& list_value) { … }
bool BrowsingDataRemoveFunction::GetRemovalMask(uint64_t* removal_mask) { … }
bool BrowsingDataRemoveFunction::IsPauseSyncAllowed() { … }
bool BrowsingDataRemoveAppcacheFunction::GetRemovalMask(
uint64_t* removal_mask) { … }
bool BrowsingDataRemoveCacheFunction::GetRemovalMask(uint64_t* removal_mask) { … }
bool BrowsingDataRemoveCookiesFunction::GetRemovalMask(uint64_t* removal_mask) { … }
bool BrowsingDataRemoveDownloadsFunction::GetRemovalMask(
uint64_t* removal_mask) { … }
bool BrowsingDataRemoveFileSystemsFunction::GetRemovalMask(
uint64_t* removal_mask) { … }
bool BrowsingDataRemoveFormDataFunction::GetRemovalMask(
uint64_t* removal_mask) { … }
bool BrowsingDataRemoveHistoryFunction::GetRemovalMask(uint64_t* removal_mask) { … }
bool BrowsingDataRemoveIndexedDBFunction::GetRemovalMask(
uint64_t* removal_mask) { … }
bool BrowsingDataRemoveLocalStorageFunction::GetRemovalMask(
uint64_t* removal_mask) { … }
bool BrowsingDataRemovePluginDataFunction::GetRemovalMask(
uint64_t* removal_mask) { … }
bool BrowsingDataRemovePasswordsFunction::GetRemovalMask(
uint64_t* removal_mask) { … }
bool BrowsingDataRemoveServiceWorkersFunction::GetRemovalMask(
uint64_t* removal_mask) { … }
bool BrowsingDataRemoveCacheStorageFunction::GetRemovalMask(
uint64_t* removal_mask) { … }
bool BrowsingDataRemoveWebSQLFunction::GetRemovalMask(uint64_t* removal_mask) { … }