[Chrome OS] Move initialization of MessageCenter singleton into Ash.

also,
- use native notifications any time Mash is enabled
- get rid of ScopedKeepAlive in ProfileNotification for Chrome OS
  and the call to clear ScopedKeepAlives in HandleAppExitingForPlatform.
  This should have no effect on a normal run of Chrome, where the
  browser process is kept alive regardless of how many browser windows
  are left, but it's necessary to do this for browser tests to
  terminate cleanly without jumping through the hoops of manually
  destroying existing ProfileNotification objects.

Change-Id: I510ec4e774965159ee03209791f6bd1c43c3c042
Reviewed-on: https://chromium-review.googlesource.com/940186
Reviewed-by: Scott Violet <[email protected]>
Reviewed-by: Steven Bennetts <[email protected]>
Reviewed-by: James Cook <[email protected]>
Commit-Queue: Evan Stade <[email protected]>
Cr-Commit-Position: refs/heads/master@{#542884}
diff --git a/chrome/browser/notifications/notification_display_service_impl.cc b/chrome/browser/notifications/notification_display_service_impl.cc
index 1fc397d..0744469 100644
--- a/chrome/browser/notifications/notification_display_service_impl.cc
+++ b/chrome/browser/notifications/notification_display_service_impl.cc
@@ -20,7 +20,7 @@
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/common/chrome_features.h"
 #include "content/public/browser/browser_thread.h"
-#include "ui/base/ui_features.h"
+#include "ui/base/ui_base_features.h"
 #include "ui/message_center/public/cpp/notification.h"
 
 #if BUILDFLAG(ENABLE_EXTENSIONS)
@@ -70,6 +70,11 @@
 #elif defined(OS_WIN)
   if (NotificationPlatformBridgeWin::NativeNotificationEnabled())
     return g_browser_process->notification_platform_bridge();
+#elif defined(OS_CHROMEOS)
+  if (base::FeatureList::IsEnabled(features::kNativeNotifications) ||
+      base::FeatureList::IsEnabled(features::kMash)) {
+    return g_browser_process->notification_platform_bridge();
+  }
 #else
   if (base::FeatureList::IsEnabled(features::kNativeNotifications) &&
       g_browser_process->notification_platform_bridge()) {