Add ICU message format support
[chromium-blink-merge.git] / chrome / browser / apps / shortcut_manager_factory.cc
blob06839ce8e84cf6c8f5385b8671362bf3b8ee5aab
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/apps/shortcut_manager_factory.h"
7 #include "base/memory/singleton.h"
8 #include "chrome/browser/apps/shortcut_manager.h"
9 #include "chrome/browser/profiles/profile.h"
10 #include "components/keyed_service/content/browser_context_dependency_manager.h"
12 // static
13 AppShortcutManager* AppShortcutManagerFactory::GetForProfile(Profile* profile) {
14 return static_cast<AppShortcutManager*>(
15 GetInstance()->GetServiceForBrowserContext(profile,
16 false /* don't create */));
19 AppShortcutManagerFactory* AppShortcutManagerFactory::GetInstance() {
20 return Singleton<AppShortcutManagerFactory>::get();
23 AppShortcutManagerFactory::AppShortcutManagerFactory()
24 : BrowserContextKeyedServiceFactory(
25 "AppShortcutManager",
26 BrowserContextDependencyManager::GetInstance()) {
29 AppShortcutManagerFactory::~AppShortcutManagerFactory() {
32 KeyedService* AppShortcutManagerFactory::BuildServiceInstanceFor(
33 content::BrowserContext* profile) const {
34 return new AppShortcutManager(static_cast<Profile*>(profile));
37 bool AppShortcutManagerFactory::ServiceIsCreatedWithBrowserContext() const {
38 return true;
41 bool AppShortcutManagerFactory::ServiceIsNULLWhileTesting() const {
42 return true;