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

Side by Side Diff: chrome/browser/ui/tabs/pinned_tab_service_factory.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 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/ui/tabs/pinned_tab_service_factory.h" 5 #include "chrome/browser/ui/tabs/pinned_tab_service_factory.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/tabs/pinned_tab_service.h" 8 #include "chrome/browser/ui/tabs/pinned_tab_service.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h" 9 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10 10
11 // static 11 // static
12 PinnedTabService* PinnedTabServiceFactory::GetForProfile( 12 PinnedTabService* PinnedTabServiceFactory::GetForProfile(
13 Profile* profile) { 13 Profile* profile) {
14 return static_cast<PinnedTabService*>( 14 return static_cast<PinnedTabService*>(
15 GetInstance()->GetServiceForBrowserContext(profile, true)); 15 GetInstance()->GetServiceForBrowserContext(profile, true));
16 } 16 }
17 17
18 PinnedTabServiceFactory* PinnedTabServiceFactory::GetInstance() { 18 PinnedTabServiceFactory* PinnedTabServiceFactory::GetInstance() {
19 return Singleton<PinnedTabServiceFactory>::get(); 19 return base::Singleton<PinnedTabServiceFactory>::get();
20 } 20 }
21 21
22 PinnedTabServiceFactory::PinnedTabServiceFactory() 22 PinnedTabServiceFactory::PinnedTabServiceFactory()
23 : BrowserContextKeyedServiceFactory( 23 : BrowserContextKeyedServiceFactory(
24 "PinnedTabService", 24 "PinnedTabService",
25 BrowserContextDependencyManager::GetInstance()) { 25 BrowserContextDependencyManager::GetInstance()) {
26 } 26 }
27 27
28 PinnedTabServiceFactory::~PinnedTabServiceFactory() { 28 PinnedTabServiceFactory::~PinnedTabServiceFactory() {
29 } 29 }
30 30
31 KeyedService* PinnedTabServiceFactory::BuildServiceInstanceFor( 31 KeyedService* PinnedTabServiceFactory::BuildServiceInstanceFor(
32 content::BrowserContext* profile) const { 32 content::BrowserContext* profile) const {
33 return new PinnedTabService(static_cast<Profile*>(profile)); 33 return new PinnedTabService(static_cast<Profile*>(profile));
34 } 34 }
35 35
36 bool PinnedTabServiceFactory::ServiceIsCreatedWithBrowserContext() const { 36 bool PinnedTabServiceFactory::ServiceIsCreatedWithBrowserContext() const {
37 return true; 37 return true;
38 } 38 }
39 39
40 bool PinnedTabServiceFactory::ServiceIsNULLWhileTesting() const { 40 bool PinnedTabServiceFactory::ServiceIsNULLWhileTesting() const {
41 return true; 41 return true;
42 } 42 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/tabs/pinned_tab_service_factory.h ('k') | chrome/browser/ui/toolbar/toolbar_actions_model_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698