blob: 090e9e551fffa39988aea3f0e4b9a4db1c0fb436 [file] [log] [blame]
// Copyright 2019 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.
#ifndef CHROME_BROWSER_ANDROID_EXPLORE_SITES_CLEAR_ACTIVITIES_TASK_H_
#define CHROME_BROWSER_ANDROID_EXPLORE_SITES_CLEAR_ACTIVITIES_TASK_H_
#include "base/time/time.h"
#include "chrome/browser/android/explore_sites/explore_sites_store.h"
#include "chrome/browser/android/explore_sites/explore_sites_types.h"
#include "components/offline_pages/task/task.h"
using offline_pages::Task;
namespace explore_sites {
// Takes a URL that the user has asked us to remove, and adds it to a blacklist
// of sites we will stop showing in Explore on Sites.
class ClearActivitiesTask : public Task {
public:
ClearActivitiesTask(ExploreSitesStore* store,
base::Time begin,
base::Time end,
BooleanCallback callback);
~ClearActivitiesTask() override;
private:
// Task implementation:
void Run() override;
void DoneExecuting(bool result);
ExploreSitesStore* store_; // outlives this class.
base::Time begin_;
base::Time end_;
BooleanCallback callback_;
base::WeakPtrFactory<ClearActivitiesTask> weak_factory_;
};
} // namespace explore_sites
#endif // CHROME_BROWSER_ANDROID_EXPLORE_SITES_CLEAR_ACTIVITIES_TASK_H_