Index: chrome/browser/push_messaging/push_messaging_service_impl.h |
diff --git a/chrome/browser/push_messaging/push_messaging_service_impl.h b/chrome/browser/push_messaging/push_messaging_service_impl.h |
index 04dd34d517ba2450db8e80e5c662a0db909e13e0..ab292438874ed0beee58b5f9e5ec5c71761eb8e9 100644 |
--- a/chrome/browser/push_messaging/push_messaging_service_impl.h |
+++ b/chrome/browser/push_messaging/push_messaging_service_impl.h |
@@ -26,6 +26,8 @@ |
#include "components/gcm_driver/gcm_client.h" |
#include "components/gcm_driver/instance_id/instance_id.h" |
#include "components/keyed_service/core/keyed_service.h" |
+#include "content/public/browser/notification_observer.h" |
+#include "content/public/browser/notification_registrar.h" |
#include "content/public/browser/push_messaging_service.h" |
#include "content/public/common/push_event_payload.h" |
#include "content/public/common/push_messaging_status.h" |
@@ -47,6 +49,7 @@ class InstanceIDDriver; |
} |
class PushMessagingServiceImpl : public content::PushMessagingService, |
+ public content::NotificationObserver, |
public gcm::GCMAppHandler, |
public content_settings::Observer, |
public KeyedService, |
@@ -71,6 +74,14 @@ class PushMessagingServiceImpl : public content::PushMessagingService, |
const std::string& message_id) override; |
bool CanHandle(const std::string& app_id) const override; |
+ // content::NotificationObserver: |
+ // TODO(sammiequon): This is used to help debug the crash in crbug.com/660962. |
+ // Remove this when the crash is fixed or if verified to not be related to |
+ // this. |
+ void Observe(int type, |
+ const content::NotificationSource& source, |
+ const content::NotificationDetails& details) override; |
+ |
// content::PushMessagingService implementation: |
GURL GetEndpoint(bool standard_protocol) const override; |
void SubscribeFromDocument(const GURL& requesting_origin, |
@@ -266,6 +277,8 @@ class PushMessagingServiceImpl : public content::PushMessagingService, |
std::unique_ptr<PushMessagingServiceObserver> |
push_messaging_service_observer_; |
+ content::NotificationRegistrar registrar_; |
+ |
#if BUILDFLAG(ENABLE_BACKGROUND) |
// KeepAlive registered while we have in-flight push messages, to make sure |
// we can finish processing them without being interrupted. |