BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / chrome / browser / ui / tabs / pinned_tab_service_factory.cc
blob9c1241057d60b86e940e10f1431a269eb30784cb
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
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/tabs/pinned_tab_service_factory.h"
7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/tabs/pinned_tab_service.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h"
11 // static
12 PinnedTabService* PinnedTabServiceFactory::GetForProfile(
13 Profile* profile) {
14 return static_cast<PinnedTabService*>(
15 GetInstance()->GetServiceForBrowserContext(profile, true));
18 PinnedTabServiceFactory* PinnedTabServiceFactory::GetInstance() {
19 return base::Singleton<PinnedTabServiceFactory>::get();
22 PinnedTabServiceFactory::PinnedTabServiceFactory()
23 : BrowserContextKeyedServiceFactory(
24 "PinnedTabService",
25 BrowserContextDependencyManager::GetInstance()) {
28 PinnedTabServiceFactory::~PinnedTabServiceFactory() {
31 KeyedService* PinnedTabServiceFactory::BuildServiceInstanceFor(
32 content::BrowserContext* profile) const {
33 return new PinnedTabService(static_cast<Profile*>(profile));
36 bool PinnedTabServiceFactory::ServiceIsCreatedWithBrowserContext() const {
37 return true;
40 bool PinnedTabServiceFactory::ServiceIsNULLWhileTesting() const {
41 return true;