summaryrefslogtreecommitdiffstats
path: root/chrome/browser/android/preferences
diff options
context:
space:
mode:
authorpeter <peter@chromium.org>2015-01-09 08:42:20 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-09 16:43:16 +0000
commit95c44bb9cd2e1bdad1eaf99b6a0896708466bb67 (patch)
tree3dac24a1b85fbc301657054c87fabd76b652d988 /chrome/browser/android/preferences
parent4d026c85f12efc21aefd37006b8d37be81c0cffa (diff)
downloadchromium_src-95c44bb9cd2e1bdad1eaf99b6a0896708466bb67.zip
chromium_src-95c44bb9cd2e1bdad1eaf99b6a0896708466bb67.tar.gz
chromium_src-95c44bb9cd2e1bdad1eaf99b6a0896708466bb67.tar.bz2
Use the correct content setting for toggling Push Notification permission.
The code is currently toggling the defaults for PUSH_MESSAGING, but it should be using NOTIFICATIONS instead. BUG=90795 Review URL: https://codereview.chromium.org/845723003 Cr-Commit-Position: refs/heads/master@{#310779}
Diffstat (limited to 'chrome/browser/android/preferences')
-rw-r--r--chrome/browser/android/preferences/pref_service_bridge.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/android/preferences/pref_service_bridge.cc b/chrome/browser/android/preferences/pref_service_bridge.cc
index 808d56e..aa37726 100644
--- a/chrome/browser/android/preferences/pref_service_bridge.cc
+++ b/chrome/browser/android/preferences/pref_service_bridge.cc
@@ -275,7 +275,7 @@ static jboolean GetPushNotificationsEnabled(JNIEnv* env, jobject obj) {
HostContentSettingsMap* content_settings =
GetOriginalProfile()->GetHostContentSettingsMap();
return GetBooleanForContentSetting(content_settings,
- CONTENT_SETTINGS_TYPE_PUSH_MESSAGING);
+ CONTENT_SETTINGS_TYPE_NOTIFICATIONS);
}
static jboolean GetAllowLocationEnabled(JNIEnv* env, jobject obj) {
@@ -442,7 +442,7 @@ static void SetPushNotificationsEnabled(JNIEnv* env,
HostContentSettingsMap* host_content_settings_map =
GetOriginalProfile()->GetHostContentSettingsMap();
host_content_settings_map->SetDefaultContentSetting(
- CONTENT_SETTINGS_TYPE_PUSH_MESSAGING,
+ CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
allow ? CONTENT_SETTING_ASK : CONTENT_SETTING_BLOCK);
}