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

Unified Diff: chrome/browser/profiles/profile.cc

Issue 6813116: Revert 81277 - Profile shouldn't own DesktopNotificationService.DesktopNotificationService is now... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 8 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 | « chrome/browser/profiles/profile.h ('k') | chrome/browser/profiles/profile_dependency_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile.cc
===================================================================
--- chrome/browser/profiles/profile.cc (revision 81278)
+++ chrome/browser/profiles/profile.cc (working copy)
@@ -23,6 +23,7 @@
#include "chrome/browser/extensions/extension_process_manager.h"
#include "chrome/browser/extensions/extension_special_storage_policy.h"
#include "chrome/browser/net/pref_proxy_config_service.h"
+#include "chrome/browser/notifications/desktop_notification_service.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/off_the_record_profile_io_data.h"
#include "chrome/browser/profiles/profile_dependency_manager.h"
@@ -504,6 +505,14 @@
return profile_->GetProtocolHandlerRegistry();
}
+ virtual DesktopNotificationService* GetDesktopNotificationService() {
+ if (!desktop_notification_service_.get()) {
+ desktop_notification_service_.reset(new DesktopNotificationService(
+ this, g_browser_process->notification_ui_manager()));
+ }
+ return desktop_notification_service_.get();
+ }
+
virtual TokenService* GetTokenService() {
return NULL;
}
@@ -693,6 +702,9 @@
// The download manager that only stores downloaded items in memory.
scoped_refptr<DownloadManager> download_manager_;
+ // Use a separate desktop notification service for OTR.
+ scoped_ptr<DesktopNotificationService> desktop_notification_service_;
+
// We use a non-writable content settings map for OTR.
scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
« no previous file with comments | « chrome/browser/profiles/profile.h ('k') | chrome/browser/profiles/profile_dependency_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698