OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_GCM_HANDLER_H_ |
| 6 #define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_GCM_HANDLER_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 namespace gcm { |
| 11 class GCMAppHandler; |
| 12 } // namespace gcm |
| 13 |
| 14 namespace offline_pages { |
| 15 |
| 16 class PrefetchGCMHandler; |
| 17 |
| 18 // Main class and entry point for the Offline Pages Prefetching feature, that |
| 19 // controls the lifetime of all major subcomponents of the prefetching system. |
| 20 class PrefetchGCMHandler { |
| 21 public: |
| 22 virtual ~PrefetchGCMHandler() = default; |
| 23 |
| 24 // Returns the GCMAppHandler for this object. Can return |nullptr| in unit |
| 25 // tests. |
| 26 virtual gcm::GCMAppHandler* AsGCMAppHandler() = 0; |
| 27 |
| 28 // The app ID to register with at the GCM layer. |
| 29 virtual std::string GetAppId() const = 0; |
| 30 |
| 31 // TODO(dewittj): Add methods for acquiring an Instance ID token to this |
| 32 // interface. |
| 33 }; |
| 34 |
| 35 } // namespace offline_pages |
| 36 |
| 37 #endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_GCM_HANDLER_H_ |
OLD | NEW |