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

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

Issue 1127013008: Beginnings of synchronizing notifications in the notification database. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 2014 The Chromium Authors. All rights reserved. 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 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_ui_manager.h" 5 #include "chrome/browser/notifications/notification_ui_manager.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/notifications/message_center_notification_manager.h" 9 #include "chrome/browser/notifications/message_center_notification_manager.h"
10 #include "chrome/browser/notifications/message_center_settings_controller.h" 10 #include "chrome/browser/notifications/message_center_settings_controller.h"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/profiles/profile_info_cache.h" 12 #include "chrome/browser/profiles/profile_info_cache.h"
13 #include "chrome/browser/profiles/profile_manager.h" 13 #include "chrome/browser/profiles/profile_manager.h"
14 14
15 // static 15 // static
16 NotificationUIManager* NotificationUIManager::Create(PrefService* local_state) { 16 NotificationUIManager* NotificationUIManager::Create(PrefService* local_state) {
17 ProfileManager* profile_manager = g_browser_process->profile_manager();
18 if (!profile_manager)
19 return nullptr;
20
17 ProfileInfoCache* profile_info_cache = 21 ProfileInfoCache* profile_info_cache =
18 &g_browser_process->profile_manager()->GetProfileInfoCache(); 22 &profile_manager->GetProfileInfoCache();
19 scoped_ptr<message_center::NotifierSettingsProvider> settings_provider( 23 scoped_ptr<message_center::NotifierSettingsProvider> settings_provider(
20 new MessageCenterSettingsController(profile_info_cache)); 24 new MessageCenterSettingsController(profile_info_cache));
21 return new MessageCenterNotificationManager( 25 return new MessageCenterNotificationManager(
22 g_browser_process->message_center(), 26 g_browser_process->message_center(),
23 local_state, 27 local_state,
24 settings_provider.Pass()); 28 settings_provider.Pass());
25 } 29 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698