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

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

Issue 2856753002: Linux native notifications: Add server capabilities metrics (Closed)
Patch Set: git cl lint 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..bf8d93742b22a25857f0217864d70598ae2625ce 100644
--- a/chrome/browser/notifications/native_notification_display_service.cc
+++ b/chrome/browser/notifications/native_notification_display_service.cc
@@ -4,8 +4,11 @@
#include "chrome/browser/notifications/native_notification_display_service.h"
+#include <utility>
+
#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 +69,10 @@ 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/03 22:52:48 nit: I don't think this comment adds a lot, the co
Tom (Use chromium acct) 2017/05/04 00:07:38 Done.
+ UMA_HISTOGRAM_BOOLEAN("Notifications.UsingNativeNotificationCenter", success);
if (success) {
notification_bridge_ready_ = true;
} else {

Powered by Google App Engine
This is Rietveld 408576698