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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationSettingsBridge.java

Issue 2922473003: [Android] Implement GetRuleIterator for channels provider (Closed)
Patch Set: Created 3 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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.notifications; 5 package org.chromium.chrome.browser.notifications;
6 6
7 import org.chromium.base.BuildInfo; 7 import org.chromium.base.BuildInfo;
8 import org.chromium.base.annotations.CalledByNative; 8 import org.chromium.base.annotations.CalledByNative;
9 9
10 /** 10 /**
(...skipping 20 matching lines...) Expand all
31 return false; 31 return false;
32 } 32 }
33 33
34 @CalledByNative 34 @CalledByNative
35 static @NotificationChannelStatus int getChannelStatus(String origin) { 35 static @NotificationChannelStatus int getChannelStatus(String origin) {
36 // TODO(crbug.com/700377) Actually check channel status. 36 // TODO(crbug.com/700377) Actually check channel status.
37 return NotificationChannelStatus.UNAVAILABLE; 37 return NotificationChannelStatus.UNAVAILABLE;
38 } 38 }
39 39
40 @CalledByNative 40 @CalledByNative
41 static SiteChannel[] getSiteChannels() {
42 // TODO(crbug.com/700377) Actually get site channels.
43 return new SiteChannel[] {};
44 }
45
46 @CalledByNative
41 static void deleteChannel(String origin) { 47 static void deleteChannel(String origin) {
42 // TODO(crbug.com/700377) Actually delete channel. 48 // TODO(crbug.com/700377) Actually delete channel.
43 } 49 }
50
51 static class SiteChannel {
52 private final String mOrigin;
53 private final int mStatus;
54
55 private SiteChannel(String origin, int status) {
56 mOrigin = origin;
57 mStatus = status;
58 }
59
60 @CalledByNative("SiteChannel")
61 private String getOrigin() {
62 return mOrigin;
63 }
64
65 @CalledByNative("SiteChannel")
66 private int getStatus() {
Peter Beverloo 2017/06/02 15:14:26 Should this (and `int status` in the member/constr
awdf 2017/06/02 16:59:48 Done.
67 return mStatus;
68 }
69 }
44 } 70 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698