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

Unified Diff: chrome/browser/notifications/notification_ui_manager_mac.mm

Issue 20066003: Update notification settings to allow for multiprofile situations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: And remove unneeded include. Created 7 years, 4 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/browser/notifications/notification_ui_manager_mac.mm
diff --git a/chrome/browser/notifications/notification_ui_manager_mac.mm b/chrome/browser/notifications/notification_ui_manager_mac.mm
index 5222aa12af65f3a6c268abd4fdcd60497e58563e..d0b783c1fdf51b9fbf47a72ce9e5dcbaff261d03 100644
--- a/chrome/browser/notifications/notification_ui_manager_mac.mm
+++ b/chrome/browser/notifications/notification_ui_manager_mac.mm
@@ -6,12 +6,16 @@
#include "base/mac/cocoa_protocols.h"
#include "base/mac/mac_util.h"
+#include "base/memory/scoped_ptr.h"
#include "base/strings/sys_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/notifications/notification.h"
#include "chrome/browser/notifications/balloon_notification_ui_manager.h"
#include "chrome/browser/notifications/message_center_notification_manager.h"
+#include "chrome/browser/notifications/message_center_settings_controller.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/profiles/profile_info_cache.h"
+#include "chrome/browser/profiles/profile_manager.h"
#include "ui/message_center/message_center_util.h"
@class NSUserNotificationCenter;
@@ -101,8 +105,14 @@ NotificationUIManager* NotificationUIManager::Create(PrefService* local_state) {
// TODO(rsesek): Remove this function and merge it with the one in
// notification_ui_manager.cc.
if (DelegatesToMessageCenter()) {
+ ProfileInfoCache* profile_info_cache =
+ &g_browser_process->profile_manager()->GetProfileInfoCache();
+ scoped_ptr<message_center::NotifierSettingsProvider> settings_provider(
+ new MessageCenterSettingsController(profile_info_cache));
return new MessageCenterNotificationManager(
- g_browser_process->message_center(), local_state);
+ g_browser_process->message_center(),
+ local_state,
+ settings_provider.Pass());
}
BalloonNotificationUIManager* balloon_manager = NULL;
« no previous file with comments | « chrome/browser/notifications/notification_ui_manager.cc ('k') | chrome/browser/ui/ash/screenshot_taker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698