Add ICU message format support
[chromium-blink-merge.git] / chrome / browser / notifications / notification_ui_manager_desktop.cc
blob90c2c740276b03ac5cce2dd1f3e5969607e844ab
1 // Copyright 2014 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.
5 #include "chrome/browser/notifications/notification_ui_manager.h"
7 #include "base/memory/scoped_ptr.h"
8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/notifications/message_center_notification_manager.h"
10 #include "chrome/browser/notifications/message_center_settings_controller.h"
11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/profiles/profile_info_cache.h"
13 #include "chrome/browser/profiles/profile_manager.h"
15 // static
16 NotificationUIManager* NotificationUIManager::Create(PrefService* local_state) {
17 ProfileManager* profile_manager = g_browser_process->profile_manager();
18 if (!profile_manager)
19 return nullptr;
21 ProfileInfoCache* profile_info_cache =
22 &profile_manager->GetProfileInfoCache();
23 scoped_ptr<message_center::NotifierSettingsProvider> settings_provider(
24 new MessageCenterSettingsController(profile_info_cache));
25 return new MessageCenterNotificationManager(
26 g_browser_process->message_center(),
27 local_state,
28 settings_provider.Pass());