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

Unified Diff: chrome/browser/notifications/native_notification_display_service.cc

Issue 2856753002: Linux native notifications: Add server capabilities metrics (Closed)
Patch Set: address mpearson@'s comments Created 3 years, 8 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/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 {

Powered by Google App Engine
This is Rietveld 408576698