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

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

Issue 2039953002: Add a preference for disabling vibration in notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/platform_notification_service_impl.cc
diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc
index b02457e24a1a7bcb6cba3b0d2dc735c41d341477..af9ed4b997d06cc0266b7f3fe8036d2c8bf41b46 100644
--- a/chrome/browser/notifications/platform_notification_service_impl.cc
+++ b/chrome/browser/notifications/platform_notification_service_impl.cc
@@ -33,6 +33,7 @@
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings_types.h"
+#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/pref_service.h"
#include "components/url_formatter/url_formatter.h"
#include "content/public/browser/browser_thread.h"
@@ -146,6 +147,14 @@ void CancelNotification(const std::string& notification_id,
} // namespace
// static
+void PlatformNotificationServiceImpl::RegisterProfilePrefs(
+ user_prefs::PrefRegistrySyncable* registry) {
+#if defined(OS_ANDROID)
+ registry->RegisterBooleanPref(prefs::kNotificationsVibrateEnabled, true);
Peter Beverloo 2016/06/07 12:46:01 Should this be part of the NotificationPlatformBri
Michael van Ouwerkerk 2016/06/07 16:34:21 Done.
+#endif
+}
+
+// static
PlatformNotificationServiceImpl*
PlatformNotificationServiceImpl::GetInstance() {
return base::Singleton<PlatformNotificationServiceImpl>::get();

Powered by Google App Engine
This is Rietveld 408576698