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

Unified Diff: chrome/browser/push_messaging/push_messaging_service_impl.h

Issue 2719813005: CrOS: Add print statements to help debug BrowserProcessImpl::Unpin crash. (Closed)
Patch Set: Whitespace. Created 3 years, 10 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: 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 920f44e8180b6d20c1d5ff1835888729027a12ed..b5ebac1256533e254d003f4c9ca19591aa41c10b 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,11 @@ class PushMessagingServiceImpl : public content::PushMessagingService,
const std::string& message_id) override;
bool CanHandle(const std::string& app_id) const override;
+ // content::NotificationObserver:
+ 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 +274,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.

Powered by Google App Engine
This is Rietveld 408576698