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

Side by Side Diff: chrome/browser/bookmarks/managed_bookmark_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/bookmarks/managed_bookmark_service_factory.h" 5 #include "chrome/browser/bookmarks/managed_bookmark_service_factory.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 27 matching lines...) Expand all
38 38
39 // static 39 // static
40 bookmarks::ManagedBookmarkService* ManagedBookmarkServiceFactory::GetForProfile( 40 bookmarks::ManagedBookmarkService* ManagedBookmarkServiceFactory::GetForProfile(
41 Profile* profile) { 41 Profile* profile) {
42 return static_cast<bookmarks::ManagedBookmarkService*>( 42 return static_cast<bookmarks::ManagedBookmarkService*>(
43 GetInstance()->GetServiceForBrowserContext(profile, true)); 43 GetInstance()->GetServiceForBrowserContext(profile, true));
44 } 44 }
45 45
46 // static 46 // static
47 ManagedBookmarkServiceFactory* ManagedBookmarkServiceFactory::GetInstance() { 47 ManagedBookmarkServiceFactory* ManagedBookmarkServiceFactory::GetInstance() {
48 return Singleton<ManagedBookmarkServiceFactory>::get(); 48 return base::Singleton<ManagedBookmarkServiceFactory>::get();
49 } 49 }
50 50
51 // static 51 // static
52 BrowserContextKeyedServiceFactory::TestingFactoryFunction 52 BrowserContextKeyedServiceFactory::TestingFactoryFunction
53 ManagedBookmarkServiceFactory::GetDefaultFactory() { 53 ManagedBookmarkServiceFactory::GetDefaultFactory() {
54 return &BuildManagedBookmarkService; 54 return &BuildManagedBookmarkService;
55 } 55 }
56 56
57 ManagedBookmarkServiceFactory::ManagedBookmarkServiceFactory() 57 ManagedBookmarkServiceFactory::ManagedBookmarkServiceFactory()
58 : BrowserContextKeyedServiceFactory( 58 : BrowserContextKeyedServiceFactory(
(...skipping 10 matching lines...) Expand all
69 } 69 }
70 70
71 content::BrowserContext* ManagedBookmarkServiceFactory::GetBrowserContextToUse( 71 content::BrowserContext* ManagedBookmarkServiceFactory::GetBrowserContextToUse(
72 content::BrowserContext* context) const { 72 content::BrowserContext* context) const {
73 return chrome::GetBrowserContextRedirectedInIncognito(context); 73 return chrome::GetBrowserContextRedirectedInIncognito(context);
74 } 74 }
75 75
76 bool ManagedBookmarkServiceFactory::ServiceIsNULLWhileTesting() const { 76 bool ManagedBookmarkServiceFactory::ServiceIsNULLWhileTesting() const {
77 return true; 77 return true;
78 } 78 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698