OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/notifications/notification_operation_common.h" | |
6 | |
7 #include "chrome/browser/profiles/profile.h" | |
8 #include "chrome/browser/ui/chrome_pages.h" | |
9 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" | |
10 #include "chrome/common/chrome_switches.h" | |
11 #include "content/public/browser/browser_context.h" | |
12 | |
13 namespace notification_operation_common { | |
14 | |
15 void OpenNotificationSettings(content::BrowserContext* browser_context) { | |
16 #if defined(OS_ANDROID) | |
17 NOTIMPLEMENTED(); | |
18 #else | |
19 | |
20 Profile* profile = Profile::FromBrowserContext(browser_context); | |
21 DCHECK(profile); | |
22 | |
23 if (switches::SettingsWindowEnabled()) { | |
24 chrome::ShowContentSettingsExceptionsInWindow( | |
25 profile, CONTENT_SETTINGS_TYPE_NOTIFICATIONS); | |
26 } else { | |
27 chrome::ScopedTabbedBrowserDisplayer browser_displayer(profile); | |
28 chrome::ShowContentSettingsExceptions(browser_displayer.browser(), | |
29 CONTENT_SETTINGS_TYPE_NOTIFICATIONS); | |
30 } | |
31 | |
Peter Beverloo
2016/06/28 22:52:41
nit: --whitespace of lines 19 and 31. (Sorry, I kn
Miguel Garcia
2016/06/29 17:25:40
Done.
| |
32 #endif // defined(OS_ANDROID) | |
33 } | |
34 | |
35 } // namespace notification_operation_common | |
OLD | NEW |