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

Side by Side Diff: ios/chrome/browser/bookmarks/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 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 "ios/chrome/browser/bookmarks/bookmark_client_factory.h" 5 #include "ios/chrome/browser/bookmarks/bookmark_client_factory.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "components/keyed_service/core/service_access_type.h" 8 #include "components/keyed_service/core/service_access_type.h"
9 #include "components/keyed_service/ios/browser_state_dependency_manager.h" 9 #include "components/keyed_service/ios/browser_state_dependency_manager.h"
10 #include "ios/chrome/browser/bookmarks/bookmark_client_impl.h" 10 #include "ios/chrome/browser/bookmarks/bookmark_client_impl.h"
(...skipping 16 matching lines...) Expand all
27 27
28 // static 28 // static
29 BookmarkClientImpl* BookmarkClientFactory::GetForBrowserState( 29 BookmarkClientImpl* BookmarkClientFactory::GetForBrowserState(
30 ios::ChromeBrowserState* browser_state) { 30 ios::ChromeBrowserState* browser_state) {
31 return static_cast<BookmarkClientImpl*>( 31 return static_cast<BookmarkClientImpl*>(
32 GetInstance()->GetServiceForBrowserState(browser_state, true)); 32 GetInstance()->GetServiceForBrowserState(browser_state, true));
33 } 33 }
34 34
35 // static 35 // static
36 BookmarkClientFactory* BookmarkClientFactory::GetInstance() { 36 BookmarkClientFactory* BookmarkClientFactory::GetInstance() {
37 return Singleton<BookmarkClientFactory>::get(); 37 return base::Singleton<BookmarkClientFactory>::get();
38 } 38 }
39 39
40 // static 40 // static
41 BrowserStateKeyedServiceFactory::TestingFactoryFunction 41 BrowserStateKeyedServiceFactory::TestingFactoryFunction
42 BookmarkClientFactory::GetDefaultFactory() { 42 BookmarkClientFactory::GetDefaultFactory() {
43 return &BuildBookmarkClientImpl; 43 return &BuildBookmarkClientImpl;
44 } 44 }
45 45
46 BookmarkClientFactory::BookmarkClientFactory() 46 BookmarkClientFactory::BookmarkClientFactory()
47 : BrowserStateKeyedServiceFactory( 47 : BrowserStateKeyedServiceFactory(
(...skipping 10 matching lines...) Expand all
58 } 58 }
59 59
60 web::BrowserState* BookmarkClientFactory::GetBrowserStateToUse( 60 web::BrowserState* BookmarkClientFactory::GetBrowserStateToUse(
61 web::BrowserState* context) const { 61 web::BrowserState* context) const {
62 return GetBrowserStateRedirectedInIncognito(context); 62 return GetBrowserStateRedirectedInIncognito(context);
63 } 63 }
64 64
65 bool BookmarkClientFactory::ServiceIsNULLWhileTesting() const { 65 bool BookmarkClientFactory::ServiceIsNULLWhileTesting() const {
66 return true; 66 return true;
67 } 67 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/bookmarks/bookmark_client_factory.h ('k') | ios/chrome/browser/bookmarks/bookmark_model_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698