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

Unified Diff: chrome/browser/offline_pages/prefetch/prefetch_service_factory.cc

Issue 2864293003: [Offline Pages] Add a GCMAppHandler for offline page prefetch. (Closed)
Patch Set: Fix windows 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
« no previous file with comments | « chrome/browser/offline_pages/prefetch/prefetch_service_factory.h ('k') | components/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/offline_pages/prefetch/prefetch_service_factory.cc
diff --git a/components/offline_pages/content/prefetch_service_factory.cc b/chrome/browser/offline_pages/prefetch/prefetch_service_factory.cc
similarity index 81%
rename from components/offline_pages/content/prefetch_service_factory.cc
rename to chrome/browser/offline_pages/prefetch/prefetch_service_factory.cc
index ffe46b2630825585089479fcd31dfa4165481b54..76e0722687bdf88312cb5d7a30ffc4bb19962b4e 100644
--- a/components/offline_pages/content/prefetch_service_factory.cc
+++ b/chrome/browser/offline_pages/prefetch/prefetch_service_factory.cc
@@ -2,10 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "components/offline_pages/content/prefetch_service_factory.h"
+#include "chrome/browser/offline_pages/prefetch/prefetch_service_factory.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/singleton.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
+#include "components/offline_pages/core/prefetch/prefetch_gcm_app_handler.h"
#include "components/offline_pages/core/prefetch/prefetch_service_impl.h"
#include "content/public/browser/browser_context.h"
@@ -15,7 +17,6 @@ PrefetchServiceFactory::PrefetchServiceFactory()
: BrowserContextKeyedServiceFactory(
"OfflinePagePrefetchService",
BrowserContextDependencyManager::GetInstance()) {}
-
// static
PrefetchServiceFactory* PrefetchServiceFactory::GetInstance() {
return base::Singleton<PrefetchServiceFactory>::get();
@@ -30,7 +31,7 @@ PrefetchService* PrefetchServiceFactory::GetForBrowserContext(
KeyedService* PrefetchServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
- return new PrefetchServiceImpl();
+ return new PrefetchServiceImpl(base::MakeUnique<PrefetchGCMAppHandler>());
}
} // namespace offline_pages
« no previous file with comments | « chrome/browser/offline_pages/prefetch/prefetch_service_factory.h ('k') | components/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698