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

Unified Diff: components/offline_pages/content/prefetch_service_factory.cc

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/content/prefetch_service_factory.cc
diff --git a/components/offline_pages/content/prefetch_service_factory.cc b/components/offline_pages/content/prefetch_service_factory.cc
index ffe46b2630825585089479fcd31dfa4165481b54..08e4768263523728264191733170ff4cdc1e528d 100644
--- a/components/offline_pages/content/prefetch_service_factory.cc
+++ b/components/offline_pages/content/prefetch_service_factory.cc
@@ -4,9 +4,12 @@
#include "components/offline_pages/content/prefetch_service_factory.h"
+#include <memory>
+
#include "base/memory/singleton.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "components/offline_pages/core/prefetch/prefetch_service_impl.h"
+#include "components/offline_pages/core/prefetch/prefetch_store.h"
#include "content/public/browser/browser_context.h"
namespace offline_pages {
@@ -30,7 +33,10 @@ PrefetchService* PrefetchServiceFactory::GetForBrowserContext(
KeyedService* PrefetchServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
- return new PrefetchServiceImpl();
+ // TODO(carlosk): instantiate actual implementation of the store once it
+ // exists.
+ std::unique_ptr<PrefetchStore> prefetch_store;
Dmitry Titov 2017/05/18 21:24:02 Does this create an instance of abstract class? Do
carlosk 2017/05/24 20:57:26 This stores a null pointer. And I like the idea of
+ return new PrefetchServiceImpl(std::move(prefetch_store));
}
} // namespace offline_pages

Powered by Google App Engine
This is Rietveld 408576698