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

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

Issue 2863623002: [Android] Refactor: move files to chrome/browser/notifications/channels (Closed)
Patch Set: rebase Created 3 years, 7 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.incognito; 5 package org.chromium.chrome.browser.incognito;
6 6
7 import android.app.Notification; 7 import android.app.Notification;
8 import android.app.NotificationManager; 8 import android.app.NotificationManager;
9 import android.content.Context; 9 import android.content.Context;
10 10
11 import org.chromium.base.ContextUtils; 11 import org.chromium.base.ContextUtils;
12 import org.chromium.chrome.R; 12 import org.chromium.chrome.R;
13 import org.chromium.chrome.browser.notifications.ChannelDefinitions;
14 import org.chromium.chrome.browser.notifications.ChromeNotificationBuilder; 13 import org.chromium.chrome.browser.notifications.ChromeNotificationBuilder;
15 import org.chromium.chrome.browser.notifications.NotificationBuilderFactory; 14 import org.chromium.chrome.browser.notifications.NotificationBuilderFactory;
16 import org.chromium.chrome.browser.notifications.NotificationConstants; 15 import org.chromium.chrome.browser.notifications.NotificationConstants;
17 import org.chromium.chrome.browser.notifications.NotificationUmaTracker; 16 import org.chromium.chrome.browser.notifications.NotificationUmaTracker;
17 import org.chromium.chrome.browser.notifications.channels.ChannelDefinitions;
18 18
19 /** 19 /**
20 * Manages the notification indicating that there are incognito tabs opened in D ocument mode. 20 * Manages the notification indicating that there are incognito tabs opened in D ocument mode.
21 */ 21 */
22 public class IncognitoNotificationManager { 22 public class IncognitoNotificationManager {
23 private static final String INCOGNITO_TABS_OPEN_TAG = "incognito_tabs_open"; 23 private static final String INCOGNITO_TABS_OPEN_TAG = "incognito_tabs_open";
24 private static final int INCOGNITO_TABS_OPEN_ID = 100; 24 private static final int INCOGNITO_TABS_OPEN_ID = 100;
25 25
26 /** 26 /**
27 * Shows the close all incognito notification. 27 * Shows the close all incognito notification.
(...skipping 29 matching lines...) Expand all
57 /** 57 /**
58 * Dismisses the incognito notification. 58 * Dismisses the incognito notification.
59 */ 59 */
60 public static void dismissIncognitoNotification() { 60 public static void dismissIncognitoNotification() {
61 Context context = ContextUtils.getApplicationContext(); 61 Context context = ContextUtils.getApplicationContext();
62 NotificationManager nm = 62 NotificationManager nm =
63 (NotificationManager) context.getSystemService(Context.NOTIFIC ATION_SERVICE); 63 (NotificationManager) context.getSystemService(Context.NOTIFIC ATION_SERVICE);
64 nm.cancel(INCOGNITO_TABS_OPEN_TAG, INCOGNITO_TABS_OPEN_ID); 64 nm.cancel(INCOGNITO_TABS_OPEN_TAG, INCOGNITO_TABS_OPEN_ID);
65 } 65 }
66 } 66 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698