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

Unified Diff: components/offline_pages/core/prefetch/prefetch_service_test_taco.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_test_taco.cc
diff --git a/components/offline_pages/core/prefetch/prefetch_service_test_taco.cc b/components/offline_pages/core/prefetch/prefetch_service_test_taco.cc
index 4161a077a215ce0bcf744746ab9d04b85a9bec1f..833cdcd67597b491b7792d8bb9bbdce26435f494 100644
--- a/components/offline_pages/core/prefetch/prefetch_service_test_taco.cc
+++ b/components/offline_pages/core/prefetch/prefetch_service_test_taco.cc
@@ -10,8 +10,8 @@
#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_in_memory_store.h"
#include "components/offline_pages/core/prefetch/prefetch_service_impl.h"
+#include "components/offline_pages/core/prefetch/store/prefetch_store_command_factory.h"
#include "components/offline_pages/core/prefetch/suggested_articles_observer.h"
#include "components/offline_pages/core/prefetch/test_offline_metrics_collector.h"
#include "components/offline_pages/core/prefetch/test_prefetch_gcm_handler.h"
@@ -22,7 +22,8 @@ PrefetchServiceTestTaco::PrefetchServiceTestTaco() {
metrics_collector_ = base::MakeUnique<TestOfflineMetricsCollector>();
dispatcher_ = base::MakeUnique<PrefetchDispatcherImpl>();
gcm_handler_ = base::MakeUnique<TestPrefetchGCMHandler>();
- store_ = base::MakeUnique<PrefetchInMemoryStore>();
+ // TODO(carlosk): initialize store_command_factory_ once a test implementation
dewittj 2017/06/15 22:46:49 Isn't there a test one now?
carlosk 2017/06/16 01:06:58 Done.
+ // exists.
}
PrefetchServiceTestTaco::~PrefetchServiceTestTaco() = default;
@@ -45,10 +46,10 @@ void PrefetchServiceTestTaco::SetPrefetchGCMHandler(
gcm_handler_ = std::move(gcm_handler);
}
-void PrefetchServiceTestTaco::SetPrefetchStore(
- std::unique_ptr<PrefetchStore> store) {
+void PrefetchServiceTestTaco::SetPrefetchStoreCommandFactory(
+ std::unique_ptr<PrefetchStoreCommandFactory> store_command_factory) {
CHECK(!prefetch_service_);
- store_ = std::move(store);
+ store_command_factory_ = std::move(store_command_factory);
}
void PrefetchServiceTestTaco::SetSuggestedArticlesObserver(
@@ -60,7 +61,7 @@ void PrefetchServiceTestTaco::SetSuggestedArticlesObserver(
void PrefetchServiceTestTaco::CreatePrefetchService() {
prefetch_service_ = base::MakeUnique<PrefetchServiceImpl>(
std::move(metrics_collector_), std::move(dispatcher_),
- std::move(gcm_handler_), std::move(store_),
+ std::move(gcm_handler_), std::move(store_command_factory_),
std::move(suggested_articles_observer_));
}

Powered by Google App Engine
This is Rietveld 408576698