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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/website/NotificationInfo.java

Issue 2020063003: Use GetPermissionStatus instead of DesktopNotificationProfileUtil::GetContentSetting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove embber param for notifications 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.preferences.website; 5 package org.chromium.chrome.browser.preferences.website;
6 6
7 /** 7 /**
8 * Notification information for a given origin. 8 * Notification information for a given origin.
9 */ 9 */
10 public class NotificationInfo extends PermissionInfo { 10 public class NotificationInfo extends PermissionInfo {
11 public NotificationInfo(String origin, String embedder, boolean isIncognito) { 11 public NotificationInfo(String origin, String embedder, boolean isIncognito) {
12 super(origin, embedder, isIncognito); 12 super(origin, embedder, isIncognito);
13 } 13 }
14 14
15 @Override 15 @Override
16 protected int getNativePreferenceValue(String origin, String embedder, boole an isIncognito) { 16 protected int getNativePreferenceValue(String origin, String embedder, boole an isIncognito) {
17 return WebsitePreferenceBridge.nativeGetNotificationSettingForOrigin( 17 return WebsitePreferenceBridge.nativeGetNotificationSettingForOrigin(
18 origin, embedder, isIncognito); 18 origin, isIncognito);
19 } 19 }
20 20
21 @Override 21 @Override
22 protected void setNativePreferenceValue( 22 protected void setNativePreferenceValue(
23 String origin, String embedder, ContentSetting value, boolean isInco gnito) { 23 String origin, String embedder, ContentSetting value, boolean isInco gnito) {
24 WebsitePreferenceBridge.nativeSetNotificationSettingForOrigin( 24 WebsitePreferenceBridge.nativeSetNotificationSettingForOrigin(
25 origin, embedder, value.toInt(), isIncognito); 25 origin, embedder, value.toInt(), isIncognito);
26 } 26 }
27 } 27 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698