From fc1e52d59a43854f9be84dbe1dd03191c67ebaa3 Mon Sep 17 00:00:00 2001 From: "siggi@chromium.org" Date: Tue, 12 Apr 2011 19:05:42 +0000 Subject: 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 --- content/browser/renderer_host/render_message_filter.cc | 4 +--- content/browser/tab_contents/tab_contents.cc | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'content') diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc index a7387e5..3009f1b 100644 --- a/content/browser/renderer_host/render_message_filter.cc +++ b/content/browser/renderer_host/render_message_filter.cc @@ -19,7 +19,6 @@ #include "chrome/browser/net/chrome_url_request_context.h" #include "chrome/browser/net/predictor_api.h" #include "chrome/browser/notifications/desktop_notification_service.h" -#include "chrome/browser/notifications/desktop_notification_service_factory.h" #include "chrome/browser/notifications/notifications_prefs_cache.h" #include "chrome/browser/platform_util.h" #include "chrome/browser/profiles/profile.h" @@ -246,8 +245,7 @@ RenderMessageFilter::RenderMessageFilter( extensions_request_context_(profile->GetRequestContextForExtensions()), render_widget_helper_(render_widget_helper), notification_prefs_( - DesktopNotificationServiceFactory::GetForProfile(profile)-> - prefs_cache()), + profile->GetDesktopNotificationService()->prefs_cache()), host_zoom_map_(profile->GetHostZoomMap()), incognito_(profile->IsOffTheRecord()), webkit_context_(profile->GetWebKitContext()), diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc index 03a6070..b03c851 100644 --- a/content/browser/tab_contents/tab_contents.cc +++ b/content/browser/tab_contents/tab_contents.cc @@ -36,7 +36,6 @@ #include "chrome/browser/metrics/metric_event_duration_details.h" #include "chrome/browser/metrics/user_metrics.h" #include "chrome/browser/notifications/desktop_notification_service.h" -#include "chrome/browser/notifications/desktop_notification_service_factory.h" #include "chrome/browser/omnibox_search_hint.h" #include "chrome/browser/pdf_unsupported_feature.h" #include "chrome/browser/platform_util.h" @@ -2408,7 +2407,7 @@ void TabContents::WorkerCrashed() { void TabContents::RequestDesktopNotificationPermission( const GURL& source_origin, int callback_context) { DesktopNotificationService* service = - DesktopNotificationServiceFactory::GetForProfile(profile()); + profile()->GetDesktopNotificationService(); service->RequestPermission( source_origin, GetRenderProcessHost()->id(), render_view_host()->routing_id(), callback_context, this); -- cgit v1.1