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

Side by Side Diff: chrome/browser/notifications/notification_common.cc

Issue 2836093002: Make Android notifications rely on the native notification flag (Closed)
Patch Set: Add an additional check for Android Created 3 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/notifications/notification_display_service_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "chrome/browser/notifications/notification_common.h" 5 #include "chrome/browser/notifications/notification_common.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/chrome_pages.h" 8 #include "chrome/browser/ui/chrome_pages.h"
9 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" 9 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
11 #include "content/public/browser/browser_context.h" 11 #include "content/public/browser/browser_context.h"
12 12
13 // static 13 // static
14 void NotificationCommon::OpenNotificationSettings( 14 void NotificationCommon::OpenNotificationSettings(
15 content::BrowserContext* browser_context) { 15 content::BrowserContext* browser_context) {
16 #if defined(OS_ANDROID) 16 #if defined(OS_ANDROID)
17 // Android settings are opened directly from Java
17 NOTIMPLEMENTED(); 18 NOTIMPLEMENTED();
18 #else 19 #else
19 Profile* profile = Profile::FromBrowserContext(browser_context); 20 Profile* profile = Profile::FromBrowserContext(browser_context);
20 DCHECK(profile); 21 DCHECK(profile);
21 22
22 if (switches::SettingsWindowEnabled()) { 23 if (switches::SettingsWindowEnabled()) {
23 chrome::ShowContentSettingsExceptionsInWindow( 24 chrome::ShowContentSettingsExceptionsInWindow(
24 profile, CONTENT_SETTINGS_TYPE_NOTIFICATIONS); 25 profile, CONTENT_SETTINGS_TYPE_NOTIFICATIONS);
25 } else { 26 } else {
26 chrome::ScopedTabbedBrowserDisplayer browser_displayer(profile); 27 chrome::ScopedTabbedBrowserDisplayer browser_displayer(profile);
27 chrome::ShowContentSettingsExceptions(browser_displayer.browser(), 28 chrome::ShowContentSettingsExceptions(browser_displayer.browser(),
28 CONTENT_SETTINGS_TYPE_NOTIFICATIONS); 29 CONTENT_SETTINGS_TYPE_NOTIFICATIONS);
29 } 30 }
30 #endif // defined(OS_ANDROID) 31 #endif // defined(OS_ANDROID)
31 } 32 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/notifications/notification_display_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698