blob: faf7f83af645972bb0962927e98bed0d9f965d78 [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/callback_forward.h"
class GURL;
namespace base {
class Time;
namespace storage {
class SpecialStoragePolicy;
namespace content {
class BrowsingDataFilterBuilder;
class BrowsingDataRemoverDelegate {
// Determines whether |origin| matches |origin_type_mask| given
// the |special_storage_policy|.
typedef base::Callback<bool(int origin_type_mask,
const GURL& origin,
storage::SpecialStoragePolicy* policy)>
virtual ~BrowsingDataRemoverDelegate() {}
// Returns a MaskMatcherFunction to match embedder's origin types.
// This MaskMatcherFunction will be called with an |origin_type_mask|
// parameter containing ONLY embedder-defined origin types, and must be able
// to handle ALL embedder-defined typed. It must be static and support
// being called on the UI and IO thread.
virtual EmbedderOriginTypeMatcher GetOriginTypeMatcher() const = 0;
// Whether the embedder allows the removal of download history.
virtual bool MayRemoveDownloadHistory() const = 0;
// Removes embedder-specific data.
virtual void RemoveEmbedderData(
const base::Time& delete_begin,
const base::Time& delete_end,
int remove_mask,
const BrowsingDataFilterBuilder& filter_builder,
int origin_type_mask,
base::OnceClosure callback) = 0;
} // namespace content