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

Unified Diff: components/offline_pages/core/prefetch/prefetch_service_impl.cc

Issue 2920083002: Prefetching: Introduce store commands abstractions to be used by tasks. (Closed)
Patch Set: Added TODO for NWake Created 3 years, 6 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_service_impl.cc
diff --git a/components/offline_pages/core/prefetch/prefetch_service_impl.cc b/components/offline_pages/core/prefetch/prefetch_service_impl.cc
index 11d1d6fa888055dd9af5402a74c87ba69585d1bc..0f17983821896ca41bf0fdb14fcac183117eb4b2 100644
--- a/components/offline_pages/core/prefetch/prefetch_service_impl.cc
+++ b/components/offline_pages/core/prefetch/prefetch_service_impl.cc
@@ -10,8 +10,9 @@
#include "base/memory/ptr_util.h"
#include "components/offline_pages/core/prefetch/offline_metrics_collector.h"
#include "components/offline_pages/core/prefetch/prefetch_dispatcher.h"
+#include "components/offline_pages/core/prefetch/prefetch_dispatcher_impl.h"
#include "components/offline_pages/core/prefetch/prefetch_gcm_handler.h"
-#include "components/offline_pages/core/prefetch/prefetch_store.h"
+#include "components/offline_pages/core/prefetch/store/prefetch_store_command_factory.h"
#include "components/offline_pages/core/prefetch/suggested_articles_observer.h"
namespace offline_pages {
@@ -20,12 +21,12 @@ PrefetchServiceImpl::PrefetchServiceImpl(
std::unique_ptr<OfflineMetricsCollector> offline_metrics_collector,
std::unique_ptr<PrefetchDispatcher> dispatcher,
std::unique_ptr<PrefetchGCMHandler> gcm_handler,
- std::unique_ptr<PrefetchStore> store,
+ std::unique_ptr<PrefetchStoreCommandFactory> store_command_factory,
std::unique_ptr<SuggestedArticlesObserver> suggested_articles_observer)
: offline_metrics_collector_(std::move(offline_metrics_collector)),
prefetch_dispatcher_(std::move(dispatcher)),
prefetch_gcm_handler_(std::move(gcm_handler)),
- prefetch_store_(std::move(store)),
+ store_command_factory_(std::move(store_command_factory)),
suggested_articles_observer_(std::move(suggested_articles_observer)) {
prefetch_dispatcher_->SetService(this);
prefetch_gcm_handler_->SetService(this);
@@ -45,8 +46,9 @@ PrefetchGCMHandler* PrefetchServiceImpl::GetPrefetchGCMHandler() {
return prefetch_gcm_handler_.get();
}
-PrefetchStore* PrefetchServiceImpl::GetPrefetchStore() {
- return prefetch_store_.get();
+PrefetchStoreCommandFactory*
+PrefetchServiceImpl::GetPrefetchStoreCommandFactory() {
+ return store_command_factory_.get();
}
SuggestedArticlesObserver* PrefetchServiceImpl::GetSuggestedArticlesObserver() {

Powered by Google App Engine
This is Rietveld 408576698