Index: chrome/browser/notifications/native_notification_display_service.cc |
diff --git a/chrome/browser/notifications/native_notification_display_service.cc b/chrome/browser/notifications/native_notification_display_service.cc |
index 6627fe51fba86c7a55e45de972ab81063797d44a..cba8f8938ce2e578a1fde796b0832291a5b10367 100644 |
--- a/chrome/browser/notifications/native_notification_display_service.cc |
+++ b/chrome/browser/notifications/native_notification_display_service.cc |
@@ -6,6 +6,7 @@ |
#include "base/bind.h" |
#include "base/memory/ptr_util.h" |
+#include "base/metrics/histogram_macros.h" |
#include "base/strings/nullable_string16.h" |
#include "base/strings/utf_string_conversions.h" |
#include "chrome/browser/browser_process.h" |
@@ -66,6 +67,13 @@ NativeNotificationDisplayService::~NativeNotificationDisplayService() = default; |
void NativeNotificationDisplayService::OnNotificationPlatformBridgeReady( |
bool success) { |
+// If NotificationPlatformBridge initialization succeeded, use |
+// native notifications, otherwise fallback to using the Chrome |
+// message center. |
Peter Beverloo
2017/05/02 14:15:24
Did `git cl format` do this? These should be inden
Tom (Use chromium acct)
2017/05/02 18:49:41
Done.
|
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
+ UMA_HISTOGRAM_BOOLEAN("Linux.NativeNotifications.UsingNativeNotifications", |
Peter Beverloo
2017/05/02 14:15:24
What about using:
Notifications.UsingNativeNot
Tom (Use chromium acct)
2017/05/02 18:49:41
Done.
|
+ success); |
+#endif |
if (success) { |
notification_bridge_ready_ = true; |
} else { |