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

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

Issue 2864293003: [Offline Pages] Add a GCMAppHandler for offline page prefetch. (Closed)
Patch Set: Refactor to remove GCM dependency. 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_service_impl.h
diff --git a/components/offline_pages/core/prefetch/prefetch_service_impl.h b/components/offline_pages/core/prefetch/prefetch_service_impl.h
index 69346aa356ad721f13d34b818cdb714cced3531d..ebcb6f844eb880c2b77c6427fcf1da3be383998e 100644
--- a/components/offline_pages/core/prefetch/prefetch_service_impl.h
+++ b/components/offline_pages/core/prefetch/prefetch_service_impl.h
@@ -14,7 +14,15 @@ namespace offline_pages {
class PrefetchServiceImpl : public PrefetchService {
public:
- PrefetchServiceImpl();
+ // An interface allowing the prefetch service to hold a GCM App Handler for
+ // lifetime purposes. TODO(dewittj): Add an interface method for getting an
+ // InstandID token.
+ class GCMAppHandler {
Dmitry Titov 2017/05/16 19:33:23 Does it deserve a separate file? Most of the subob
fgorski 2017/05/16 20:03:02 If this is only about life cycle, why not user dat
dewittj 2017/05/16 22:58:22 Added TODO and left interface here.
+ public:
+ virtual ~GCMAppHandler() = default;
+ };
+
+ PrefetchServiceImpl(std::unique_ptr<GCMAppHandler> gcm_app_handler);
fgorski 2017/05/16 20:03:01 explicit in case you stick with the interface
dewittj 2017/05/16 22:58:22 Done.
~PrefetchServiceImpl() override;
// PrefetchService implementation:
@@ -29,6 +37,8 @@ class PrefetchServiceImpl : public PrefetchService {
void Shutdown() override;
private:
+ std::unique_ptr<GCMAppHandler> gcm_app_handler_;
+
DISALLOW_COPY_AND_ASSIGN(PrefetchServiceImpl);
};

Powered by Google App Engine
This is Rietveld 408576698