Profile shouldn't own DesktopNotificationService.
DesktopNotificationService is now owned by
DesktopNotificationServiceFactory, using Profile as a key. This uses the
ProfileKeyedService infrastructure originally created for
ThemeServiceFactory.
BUG=77155
TEST=existing tests
Review URL: http://codereview.chromium.org/6803012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81399 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index 7a1e82b9..ad1a55c 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -36,6 +36,7 @@
#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"
@@ -2352,7 +2353,7 @@
void TabContents::RequestDesktopNotificationPermission(
const GURL& source_origin, int callback_context) {
DesktopNotificationService* service =
- profile()->GetDesktopNotificationService();
+ DesktopNotificationServiceFactory::GetForProfile(profile());
service->RequestPermission(
source_origin, GetRenderProcessHost()->id(),
render_view_host()->routing_id(), callback_context, this);