Chromium Code Reviews| 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); |
| }; |