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

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

Issue 19699014: Crash on message center settings change fixed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/notifications/message_center_settings_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 71487c5736ec0f3b24f86e5af176200ff60681c7..1a660995b21b066ff82a7a4115a24dade19fc4ed 100644
--- a/chrome/browser/notifications/message_center_settings_controller.h
+++ b/chrome/browser/notifications/message_center_settings_controller.h
@@ -12,7 +12,10 @@
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
#include "chrome/browser/extensions/app_icon_loader.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/common/content_settings.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/message_center/notifier_settings.h"
class CancelableTaskTracker;
@@ -25,7 +28,8 @@ struct FaviconImageResult;
// storage.
class MessageCenterSettingsController
: public message_center::NotifierSettingsProvider,
- public extensions::AppIconLoader::Delegate {
+ public extensions::AppIconLoader::Delegate,
+ public content::NotificationObserver {
public:
MessageCenterSettingsController();
virtual ~MessageCenterSettingsController();
@@ -48,6 +52,11 @@ class MessageCenterSettingsController
const gfx::ImageSkia& image) OVERRIDE;
private:
+ // Overridden from content::NotificationObserver.
+ virtual void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
+
void OnFaviconLoaded(const GURL& url,
const chrome::FaviconImageResult& favicon_result);
@@ -61,6 +70,13 @@ class MessageCenterSettingsController
std::map<string16, ContentSettingsPattern> patterns_;
+ // The Registrar used to register for notifications.
+ content::NotificationRegistrar registrar_;
+
+ // TODO(sidharthms): Fix this for multi-profile.
+ // The profile associated with message center settings.
+ Profile* profile_;
+
DISALLOW_COPY_AND_ASSIGN(MessageCenterSettingsController);
};
« no previous file with comments | « no previous file | chrome/browser/notifications/message_center_settings_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698