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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderBase.java

Issue 2316263002: Notifications in sensitive contexts now display origin + small icon (Closed)
Patch Set: Notifications in sensitive contexts now display origin + small icon Created 4 years, 3 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/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderBase.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderBase.java b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderBase.java
index c5b0fc072f4f25b359cd9df80dd291e1933047ca..52148fd6798ca674a523c87acb90d195cd026e22 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderBase.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderBase.java
@@ -77,6 +77,7 @@ public abstract class NotificationBuilderBase {
protected long[] mVibratePattern;
protected long mTimestamp;
protected boolean mRenotify;
+ protected Notification mPublicVersion;
/**
* Combines all of the options that have been set and returns a new Notification object.
@@ -238,6 +239,14 @@ public abstract class NotificationBuilderBase {
return this;
}
+ /**
+ * Sets a replacement notification, to be shown in insecure contexts on Android L and above.
+ */
+ public NotificationBuilderBase setPublicVersion(@Nullable Notification publicVersion) {
+ mPublicVersion = publicVersion;
+ return this;
+ }
+
@Nullable
private static CharSequence limitLength(@Nullable CharSequence input) {
if (input == null) {

Powered by Google App Engine
This is Rietveld 408576698