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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/incognito/IncognitoNotificationManager.java

Issue 1847063003: Show the close all incognito notification for tabbed mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check null for file info Created 4 years, 9 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/incognito/IncognitoNotificationManager.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/document/IncognitoNotificationManager.java b/chrome/android/java/src/org/chromium/chrome/browser/incognito/IncognitoNotificationManager.java
similarity index 86%
rename from chrome/android/java/src/org/chromium/chrome/browser/document/IncognitoNotificationManager.java
rename to chrome/android/java/src/org/chromium/chrome/browser/incognito/IncognitoNotificationManager.java
index cb22ffec0b1d30c861ffe91f6a52451b0e98e285..3daaa25718638c8ec809d9c229419cd1d8e7daef 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/document/IncognitoNotificationManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/incognito/IncognitoNotificationManager.java
@@ -2,11 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-package org.chromium.chrome.browser.document;
+package org.chromium.chrome.browser.incognito;
import android.app.Notification;
import android.app.NotificationManager;
-import android.app.PendingIntent;
import android.content.Context;
import android.support.v4.app.NotificationCompat;
@@ -21,10 +20,9 @@ public class IncognitoNotificationManager {
private static final int INCOGNITO_TABS_OPEN_ID = 100;
/**
- * Updates the notification being displayed.
- * @param intent Intent to fire if the notification is selected.
+ * Shows the close all incognito notification.
*/
- public static void updateIncognitoNotification(PendingIntent intent) {
+ public static void showIncognitoNotification() {
Context context = ApplicationStatus.getApplicationContext();
String actionMessage =
context.getResources().getString(R.string.close_all_incognito_notification);
@@ -32,7 +30,8 @@ public class IncognitoNotificationManager {
NotificationCompat.Builder builder = new NotificationCompat.Builder(context)
.setContentTitle(title)
- .setContentIntent(intent)
+ .setContentIntent(
+ IncognitoNotificationService.getRemoveAllIncognitoTabsIntent(context))
.setContentText(actionMessage)
.setOngoing(true)
.setVisibility(Notification.VISIBILITY_SECRET)

Powered by Google App Engine
This is Rietveld 408576698