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

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: A couple of minor changes. 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..0f810567027dc37abe33a02b6d539b20b7885bb1 100644
--- a/components/offline_pages/core/prefetch/prefetch_dispatcher_impl.h
+++ b/components/offline_pages/core/prefetch/prefetch_dispatcher_impl.h
@@ -5,25 +5,36 @@
#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/prefetch/prefetch_store.h"
+#include "components/offline_pages/core/task_queue.h"
namespace offline_pages {
class PrefetchDispatcherImpl : public PrefetchDispatcher {
public:
- PrefetchDispatcherImpl();
+ PrefetchDispatcherImpl(std::unique_ptr<PrefetchStore> store);
~PrefetchDispatcherImpl() override;
// PrefetchDispatcher implementation:
void AddCandidatePrefetchURLs(
- const std::vector<PrefetchURL>& suggested_urls) override;
+ const std::string& name_space,
+ const std::vector<PrefetchURL>& prefetch_urls) override;
void RemoveAllUnprocessedPrefetchURLs(const std::string& name_space) override;
- void RemovePrefetchURLsByClientId(const ClientId& client_id) override;
+ void RemovePrefetchURLsByClientId(const std::string& name_space,
+ const std::string& client_id) override;
void BeginBackgroundTask(std::unique_ptr<ScopedBackgroundTask> task) override;
void StopBackgroundTask(ScopedBackgroundTask* task) override;
private:
+ friend class PrefetchDispatcherTest;
+
+ std::unique_ptr<PrefetchStore> store_;
Dmitry Titov 2017/05/18 21:24:02 Should these rather live on PrefetchService and be
carlosk 2017/05/24 20:57:26 Done.
+ TaskQueue task_queue_;
+
DISALLOW_COPY_AND_ASSIGN(PrefetchDispatcherImpl);
};

Powered by Google App Engine
This is Rietveld 408576698