Index: components/offline_pages/core/prefetch/prefetch_gcm_app_handler.cc |
diff --git a/components/offline_pages/core/prefetch/prefetch_gcm_app_handler.cc b/components/offline_pages/core/prefetch/prefetch_gcm_app_handler.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e6baf087cb0821fa7ce3c183617dce6bbb376d30 |
--- /dev/null |
+++ b/components/offline_pages/core/prefetch/prefetch_gcm_app_handler.cc |
@@ -0,0 +1,59 @@ |
+// 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. |
+ |
+#include "components/offline_pages/core/prefetch/prefetch_gcm_app_handler.h" |
+ |
+#include "base/memory/ptr_util.h" |
+#include "components/offline_pages/core/prefetch/prefetch_service.h" |
+ |
+namespace offline_pages { |
+namespace { |
+const char kPrefetchingOfflinePagesAppId[] = |
+ "com.google.chrome.OfflinePagePrefetch"; |
+} |
+ |
+PrefetchGCMAppHandler::PrefetchGCMAppHandler() {} |
+PrefetchGCMAppHandler::~PrefetchGCMAppHandler() = default; |
+ |
+void PrefetchGCMAppHandler::ShutdownHandler() { |
+ NOTIMPLEMENTED(); |
+} |
+ |
+void PrefetchGCMAppHandler::OnStoreReset() { |
+ NOTIMPLEMENTED(); |
+} |
+ |
+void PrefetchGCMAppHandler::OnMessage(const std::string& app_id, |
+ const gcm::IncomingMessage& message) { |
+ NOTIMPLEMENTED(); |
+} |
+ |
+void PrefetchGCMAppHandler::OnMessagesDeleted(const std::string& app_id) { |
+ NOTIMPLEMENTED(); |
+} |
+ |
+void PrefetchGCMAppHandler::OnSendError( |
+ const std::string& app_id, |
+ const gcm::GCMClient::SendErrorDetails& send_error_details) { |
+ NOTIMPLEMENTED(); |
+} |
+ |
+void PrefetchGCMAppHandler::OnSendAcknowledged(const std::string& app_id, |
+ const std::string& message_id) { |
+ NOTIMPLEMENTED(); |
+} |
+ |
+bool PrefetchGCMAppHandler::CanHandle(const std::string& app_id) const { |
+ return app_id == GetAppId(); |
+} |
+ |
+gcm::GCMAppHandler* PrefetchGCMAppHandler::AsGCMAppHandler() { |
+ return (gcm::GCMAppHandler*)this; |
+} |
+ |
+std::string PrefetchGCMAppHandler::GetAppId() const { |
+ return kPrefetchingOfflinePagesAppId; |
+} |
+ |
+} // namespace offline_pages |