| Index: components/previews/previews_ui_service.h
|
| diff --git a/components/previews/previews_ui_service.h b/components/previews/previews_ui_service.h
|
| index 195b0979b82d1d4dd47621ad58888584d25fb0c3..8c540de49631baf1ce541a95df6d5d87f0bcd925 100644
|
| --- a/components/previews/previews_ui_service.h
|
| +++ b/components/previews/previews_ui_service.h
|
| @@ -5,37 +5,46 @@
|
| #ifndef COMPONENTS_PREVIEWS_PREVIEWS_UI_SERVICE_H_
|
| #define COMPONENTS_PREVIEWS_PREVIEWS_UI_SERVICE_H_
|
|
|
| #include <string>
|
|
|
| #include "base/macros.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/single_thread_task_runner.h"
|
| #include "base/threading/thread_checker.h"
|
| +#include "base/time/time.h"
|
| +#include "components/previews/previews_opt_out_store.h"
|
|
|
| namespace previews {
|
| class PreviewsIOData;
|
|
|
| // A class to manage the UI portion of inter-thread communication between
|
| // previews/ objects. Created and used on the UI thread.
|
| class PreviewsUIService {
|
| public:
|
| PreviewsUIService(
|
| PreviewsIOData* previews_io_data,
|
| - const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner);
|
| + const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner,
|
| + std::unique_ptr<PreviewsOptOutStore> previews_opt_out_store);
|
| virtual ~PreviewsUIService();
|
|
|
| // Sets |io_data_| to |io_data| to allow calls from the UI thread to the IO
|
| // thread. Virtualized in testing.
|
| virtual void SetIOData(base::WeakPtr<PreviewsIOData> io_data);
|
|
|
| + void AddPreviewNavigation(const std::string& host_name,
|
| + bool opt_out,
|
| + PreviewsType type);
|
| +
|
| + void ClearBlackList(const base::Time& begin_time, const base::Time& end_time);
|
| +
|
| private:
|
| // The IO thread portion of the inter-thread communication for previews/.
|
| base::WeakPtr<previews::PreviewsIOData> io_data_;
|
|
|
| base::ThreadChecker thread_checker_;
|
|
|
| // The IO thread task runner. Used to post tasks to |io_data_|.
|
| scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
|
|
|
| base::WeakPtrFactory<PreviewsUIService> weak_factory_;
|
|
|