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

Side by Side Diff: chrome/browser/notifications/desktop_notification_service_factory.cc

Issue 561813002: Move the logic for creating data: URLs out of DesktopNotificationService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/notifications/desktop_notification_service_factory.h" 5 #include "chrome/browser/notifications/desktop_notification_service_factory.h"
6 6
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/notifications/desktop_notification_service.h" 8 #include "chrome/browser/notifications/desktop_notification_service.h"
9 #include "chrome/browser/profiles/incognito_helpers.h" 9 #include "chrome/browser/profiles/incognito_helpers.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 19 matching lines...) Expand all
30 DesktopNotificationServiceFactory::DesktopNotificationServiceFactory() 30 DesktopNotificationServiceFactory::DesktopNotificationServiceFactory()
31 : BrowserContextKeyedServiceFactory( 31 : BrowserContextKeyedServiceFactory(
32 "DesktopNotificationService", 32 "DesktopNotificationService",
33 BrowserContextDependencyManager::GetInstance()) { 33 BrowserContextDependencyManager::GetInstance()) {
34 } 34 }
35 35
36 DesktopNotificationServiceFactory::~DesktopNotificationServiceFactory() { 36 DesktopNotificationServiceFactory::~DesktopNotificationServiceFactory() {
37 } 37 }
38 38
39 KeyedService* DesktopNotificationServiceFactory::BuildServiceInstanceFor( 39 KeyedService* DesktopNotificationServiceFactory::BuildServiceInstanceFor(
40 content::BrowserContext* profile) const { 40 content::BrowserContext* context) const {
41 DesktopNotificationService* service = 41 DesktopNotificationService* service =
42 new DesktopNotificationService(static_cast<Profile*>(profile), NULL); 42 new DesktopNotificationService(static_cast<Profile*>(context));
43 return service; 43 return service;
44 } 44 }
45 45
46 content::BrowserContext* 46 content::BrowserContext*
47 DesktopNotificationServiceFactory::GetBrowserContextToUse( 47 DesktopNotificationServiceFactory::GetBrowserContextToUse(
48 content::BrowserContext* context) const { 48 content::BrowserContext* context) const {
49 return chrome::GetBrowserContextOwnInstanceInIncognito(context); 49 return chrome::GetBrowserContextOwnInstanceInIncognito(context);
50 } 50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698