Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

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

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
Index: components/offline_pages/core/prefetch/prefetch_gcm_handler.h
diff --git a/components/offline_pages/core/prefetch/prefetch_gcm_handler.h b/components/offline_pages/core/prefetch/prefetch_gcm_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..7ce70f41449b2bb3ac4a877d28625b429c8b9fe0
--- /dev/null
+++ b/components/offline_pages/core/prefetch/prefetch_gcm_handler.h
@@ -0,0 +1,37 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_GCM_HANDLER_H_
+#define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_GCM_HANDLER_H_
+
+#include <string>
+
+namespace gcm {
+class GCMAppHandler;
+} // namespace gcm
+
+namespace offline_pages {
+
+class PrefetchGCMHandler;
+
+// Main class and entry point for the Offline Pages Prefetching feature, that
+// controls the lifetime of all major subcomponents of the prefetching system.
+class PrefetchGCMHandler {
+ public:
+ virtual ~PrefetchGCMHandler() = default;
+
+ // Returns the GCMAppHandler for this object. Can return |nullptr| in unit
+ // tests.
+ virtual gcm::GCMAppHandler* AsGCMAppHandler() = 0;
+
+ // The app ID to register with at the GCM layer.
+ virtual std::string GetAppId() const = 0;
+
+ // TODO(dewittj): Add methods for acquiring an Instance ID token to this
+ // interface.
+};
+
+} // namespace offline_pages
+
+#endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_GCM_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698