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

Side by Side Diff: chrome/browser/bookmarks/chrome_bookmark_client_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chrome_bookmark_client_factory.h" 5 #include "chrome/browser/bookmarks/chrome_bookmark_client_factory.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" 8 #include "chrome/browser/bookmarks/chrome_bookmark_client.h"
9 #include "chrome/browser/bookmarks/managed_bookmark_service_factory.h" 9 #include "chrome/browser/bookmarks/managed_bookmark_service_factory.h"
10 #include "chrome/browser/profiles/incognito_helpers.h" 10 #include "chrome/browser/profiles/incognito_helpers.h"
(...skipping 14 matching lines...) Expand all
25 25
26 // static 26 // static
27 ChromeBookmarkClient* ChromeBookmarkClientFactory::GetForProfile( 27 ChromeBookmarkClient* ChromeBookmarkClientFactory::GetForProfile(
28 Profile* profile) { 28 Profile* profile) {
29 return static_cast<ChromeBookmarkClient*>( 29 return static_cast<ChromeBookmarkClient*>(
30 GetInstance()->GetServiceForBrowserContext(profile, true)); 30 GetInstance()->GetServiceForBrowserContext(profile, true));
31 } 31 }
32 32
33 // static 33 // static
34 ChromeBookmarkClientFactory* ChromeBookmarkClientFactory::GetInstance() { 34 ChromeBookmarkClientFactory* ChromeBookmarkClientFactory::GetInstance() {
35 return Singleton<ChromeBookmarkClientFactory>::get(); 35 return base::Singleton<ChromeBookmarkClientFactory>::get();
36 } 36 }
37 37
38 // static 38 // static
39 BrowserContextKeyedServiceFactory::TestingFactoryFunction 39 BrowserContextKeyedServiceFactory::TestingFactoryFunction
40 ChromeBookmarkClientFactory::GetDefaultFactory() { 40 ChromeBookmarkClientFactory::GetDefaultFactory() {
41 return &BuildChromeBookmarkClient; 41 return &BuildChromeBookmarkClient;
42 } 42 }
43 43
44 ChromeBookmarkClientFactory::ChromeBookmarkClientFactory() 44 ChromeBookmarkClientFactory::ChromeBookmarkClientFactory()
45 : BrowserContextKeyedServiceFactory( 45 : BrowserContextKeyedServiceFactory(
(...skipping 11 matching lines...) Expand all
57 } 57 }
58 58
59 content::BrowserContext* ChromeBookmarkClientFactory::GetBrowserContextToUse( 59 content::BrowserContext* ChromeBookmarkClientFactory::GetBrowserContextToUse(
60 content::BrowserContext* context) const { 60 content::BrowserContext* context) const {
61 return chrome::GetBrowserContextRedirectedInIncognito(context); 61 return chrome::GetBrowserContextRedirectedInIncognito(context);
62 } 62 }
63 63
64 bool ChromeBookmarkClientFactory::ServiceIsNULLWhileTesting() const { 64 bool ChromeBookmarkClientFactory::ServiceIsNULLWhileTesting() const {
65 return true; 65 return true;
66 } 66 }
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/chrome_bookmark_client_factory.h ('k') | chrome/browser/bookmarks/managed_bookmark_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698