summaryrefslogtreecommitdiffstats
path: root/chrome/browser/desktop_notification_handler.cc
diff options
context:
space:
mode:
authorsiggi@chromium.org <siggi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-12 19:05:42 +0000
committersiggi@chromium.org <siggi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-12 19:05:42 +0000
commitfc1e52d59a43854f9be84dbe1dd03191c67ebaa3 (patch)
treeb7240d58bca7faa802a5c536c129d89bbe9f7ade /chrome/browser/desktop_notification_handler.cc
parent9c5330953b0d6fb7120395b3b1465a789caf6bf9 (diff)
downloadchromium_src-fc1e52d59a43854f9be84dbe1dd03191c67ebaa3.zip
chromium_src-fc1e52d59a43854f9be84dbe1dd03191c67ebaa3.tar.gz
chromium_src-fc1e52d59a43854f9be84dbe1dd03191c67ebaa3.tar.bz2
Revert 81277 - Profile shouldn't own DesktopNotificationService.DesktopNotificationService is now owned byDesktopNotificationServiceFactory, using Profile as a key. This uses theProfileKeyedService infrastructure originally created forThemeServiceFactory.BUG=77155TEST=existing testsReview URL: http://codereview.chromium.org/6803012
TBR=torne@chromium.org Review URL: http://codereview.chromium.org/6813116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81280 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/desktop_notification_handler.cc')
-rw-r--r--chrome/browser/desktop_notification_handler.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/chrome/browser/desktop_notification_handler.cc b/chrome/browser/desktop_notification_handler.cc
index 986425a..8bd2ef2 100644
--- a/chrome/browser/desktop_notification_handler.cc
+++ b/chrome/browser/desktop_notification_handler.cc
@@ -5,7 +5,6 @@
#include "chrome/browser/desktop_notification_handler.h"
#include "chrome/browser/notifications/desktop_notification_service.h"
-#include "chrome/browser/notifications/desktop_notification_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
@@ -39,7 +38,7 @@ void DesktopNotificationHandler::OnShow(
const DesktopNotificationHostMsg_Show_Params& params) {
RenderProcessHost* process = render_view_host()->process();
DesktopNotificationService* service =
- DesktopNotificationServiceFactory::GetForProfile(process->profile());
+ process->profile()->GetDesktopNotificationService();
service->ShowDesktopNotification(
params,
@@ -51,7 +50,7 @@ void DesktopNotificationHandler::OnShow(
void DesktopNotificationHandler::OnCancel(int notification_id) {
RenderProcessHost* process = render_view_host()->process();
DesktopNotificationService* service =
- DesktopNotificationServiceFactory::GetForProfile(process->profile());
+ process->profile()->GetDesktopNotificationService();
service->CancelDesktopNotification(
process->id(),
@@ -68,7 +67,7 @@ void DesktopNotificationHandler::OnRequestPermission(
RenderProcessHost* process = render_view_host()->process();
DesktopNotificationService* service =
- DesktopNotificationServiceFactory::GetForProfile(process->profile());
+ process->profile()->GetDesktopNotificationService();
service->RequestPermission(
source_origin, process->id(), routing_id(), callback_context, NULL);
}