chromium/chrome/browser/extensions/api/browsing_data/browsing_data_api.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Defines the Chrome Extensions BrowsingData API functions, which entail
// clearing browsing data, and clearing the browser's cache (which, let's be
// honest, are the same thing), as specified in the extension API JSON.

#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) {}

// Returns false if any of the selected data types are not allowed to be
// deleted.
bool IsRemovalPermitted(uint64_t removal_mask, PrefService* prefs) {}

// Returns true if Sync is currently running (i.e. enabled and not in error).
bool IsSyncRunning(Profile* profile) {}
}  // namespace

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) {}

// Parses the |dataToRemove| argument to generate the removal mask.
// Returns false if parse was not successful, i.e. if 'dataToRemove' is not
// present or any data-type keys don't have supported (boolean) values.
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) {}