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

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: 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..8f6fbbd51263457054368eb7c792db30ebcabfbf 100644
--- a/components/offline_pages/core/prefetch/prefetch_service_impl.h
+++ b/components/offline_pages/core/prefetch/prefetch_service_impl.h
@@ -7,16 +7,32 @@
#include <vector>
+#include "components/gcm_driver/common/gcm_messages.h"
+#include "components/gcm_driver/gcm_app_handler.h"
#include "components/offline_pages/core/prefetch/prefetch_service.h"
#include "url/gurl.h"
namespace offline_pages {
-class PrefetchServiceImpl : public PrefetchService {
+class PrefetchServiceImpl : public PrefetchService, public gcm::GCMAppHandler {
public:
PrefetchServiceImpl();
~PrefetchServiceImpl() override;
+ std::string GetGCMAppId();
+
+ // GCMAppHandler implementation:
+ void ShutdownHandler() override;
+ void OnStoreReset() override;
+ void OnMessage(const std::string& app_id,
+ const gcm::IncomingMessage& message) override;
+ void OnMessagesDeleted(const std::string& app_id) override;
+ void OnSendError(
+ const std::string& app_id,
+ const gcm::GCMClient::SendErrorDetails& send_error_details) override;
+ void OnSendAcknowledged(const std::string& app_id,
+ const std::string& message_id) override;
+
// PrefetchService implementation:
void AddCandidatePrefetchURLs(
const std::vector<PrefetchURL>& suggested_urls) override;

Powered by Google App Engine
This is Rietveld 408576698