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

Unified Diff: chrome/browser/notifications/message_center_settings_controller.h

Issue 895803003: [Profiles] Remove the NotificationService from the ProfileInfoCache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: maybe fix NTPLoginHandler tests Created 5 years, 10 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/message_center_settings_controller.h
diff --git a/chrome/browser/notifications/message_center_settings_controller.h b/chrome/browser/notifications/message_center_settings_controller.h
index 045e88c616f4ae19031896c8a6f41aa46c748946..ea9da2eff7878b5b6c10b50f44b2cce0788f46b7 100644
--- a/chrome/browser/notifications/message_center_settings_controller.h
+++ b/chrome/browser/notifications/message_center_settings_controller.h
@@ -14,6 +14,7 @@
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "chrome/browser/extensions/app_icon_loader.h"
+#include "chrome/browser/profiles/profile_info_cache_observer.h"
#include "components/content_settings/core/common/content_settings.h"
#include "components/favicon_base/favicon_types.h"
#include "content/public/browser/notification_details.h"
@@ -46,6 +47,7 @@ class ProfileNotifierGroup;
class MessageCenterSettingsController
: public message_center::NotifierSettingsProvider,
public content::NotificationObserver,
+ public ProfileInfoCacheObserver,
#if defined(OS_CHROMEOS)
public user_manager::UserManager::UserSessionStateObserver,
#endif
@@ -90,6 +92,14 @@ class MessageCenterSettingsController
const content::NotificationSource& source,
const content::NotificationDetails& details) override;
+ // ProfileInfoCacheObserver:
+ void OnProfileAdded(const base::FilePath& profile_path) override;
+ void OnProfileWasRemoved(const base::FilePath& profile_path,
+ const base::string16& profile_name) override;
+ void OnProfileNameChanged(const base::FilePath& profile_path,
+ const base::string16& old_profile_name) override;
+ void OnProfileUserNameChanged(const base::FilePath& profile_path) override;
+
void OnFaviconLoaded(const GURL& url,
const favicon_base::FaviconImageResult& favicon_result);
@@ -101,7 +111,9 @@ class MessageCenterSettingsController
void CreateNotifierGroupForGuestLogin();
#endif
- void RebuildNotifierGroups();
+ // Sets up the notifier groups for all profiles. If |notify| is true, then
+ // it sends out a NotifierGroupChange notification to each observer.
+ void RebuildNotifierGroups(bool notify);
// The views displaying notifier settings.
ObserverList<message_center::NotifierSettingsObserver> observers_;

Powered by Google App Engine
This is Rietveld 408576698