Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Unified Diff: components/offline_pages/core/prefetch/prefetch_dispatcher_impl.h

Issue 2879013002: Create skeleton for the Prefetching store and initial pipeline step. (Closed)
Patch Set: Made construction params a cost&. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/offline_pages/core/prefetch/prefetch_dispatcher_impl.h
diff --git a/components/offline_pages/core/prefetch/prefetch_dispatcher_impl.h b/components/offline_pages/core/prefetch/prefetch_dispatcher_impl.h
index e826d0a9f9ce4b4996f53f5c6e940f6150a85618..3764a5ba0bb991c0228ab3702bc9b428a3501834 100644
--- a/components/offline_pages/core/prefetch/prefetch_dispatcher_impl.h
+++ b/components/offline_pages/core/prefetch/prefetch_dispatcher_impl.h
@@ -5,10 +5,14 @@
#ifndef COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_DISPATCHER_IMPL_H_
#define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_DISPATCHER_IMPL_H_
+#include <memory>
+
#include "base/macros.h"
#include "components/offline_pages/core/prefetch/prefetch_dispatcher.h"
+#include "components/offline_pages/core/task_queue.h"
namespace offline_pages {
+class PrefetchService;
class PrefetchDispatcherImpl : public PrefetchDispatcher {
public:
@@ -16,14 +20,20 @@ class PrefetchDispatcherImpl : public PrefetchDispatcher {
~PrefetchDispatcherImpl() override;
// PrefetchDispatcher implementation:
+ void SetService(PrefetchService* service) override;
void AddCandidatePrefetchURLs(
- const std::vector<PrefetchURL>& suggested_urls) override;
+ const std::vector<PrefetchURL>& prefetch_urls) override;
void RemoveAllUnprocessedPrefetchURLs(const std::string& name_space) override;
void RemovePrefetchURLsByClientId(const ClientId& client_id) override;
void BeginBackgroundTask(std::unique_ptr<ScopedBackgroundTask> task) override;
void StopBackgroundTask(ScopedBackgroundTask* task) override;
private:
+ friend class PrefetchDispatcherTest;
+
+ PrefetchService* service_;
+ TaskQueue task_queue_;
+
DISALLOW_COPY_AND_ASSIGN(PrefetchDispatcherImpl);
};

Powered by Google App Engine
This is Rietveld 408576698