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

Side by Side Diff: ios/chrome/browser/web_data_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 "ios/chrome/browser/web_data_service_factory.h" 5 #include "ios/chrome/browser/web_data_service_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 WebDataServiceFactory::GetTokenWebDataForBrowserState( 74 WebDataServiceFactory::GetTokenWebDataForBrowserState(
75 ios::ChromeBrowserState* browser_state, 75 ios::ChromeBrowserState* browser_state,
76 ServiceAccessType access_type) { 76 ServiceAccessType access_type) {
77 WebDataServiceWrapper* wrapper = 77 WebDataServiceWrapper* wrapper =
78 GetForBrowserState(browser_state, access_type); 78 GetForBrowserState(browser_state, access_type);
79 return wrapper ? wrapper->GetTokenWebData() : nullptr; 79 return wrapper ? wrapper->GetTokenWebData() : nullptr;
80 } 80 }
81 81
82 // static 82 // static
83 WebDataServiceFactory* WebDataServiceFactory::GetInstance() { 83 WebDataServiceFactory* WebDataServiceFactory::GetInstance() {
84 return Singleton<WebDataServiceFactory>::get(); 84 return base::Singleton<WebDataServiceFactory>::get();
85 } 85 }
86 86
87 WebDataServiceFactory::WebDataServiceFactory() 87 WebDataServiceFactory::WebDataServiceFactory()
88 : BrowserStateKeyedServiceFactory( 88 : BrowserStateKeyedServiceFactory(
89 "WebDataService", 89 "WebDataService",
90 BrowserStateDependencyManager::GetInstance()) { 90 BrowserStateDependencyManager::GetInstance()) {
91 } 91 }
92 92
93 WebDataServiceFactory::~WebDataServiceFactory() { 93 WebDataServiceFactory::~WebDataServiceFactory() {
94 } 94 }
(...skipping 12 matching lines...) Expand all
107 web::BrowserState* WebDataServiceFactory::GetBrowserStateToUse( 107 web::BrowserState* WebDataServiceFactory::GetBrowserStateToUse(
108 web::BrowserState* context) const { 108 web::BrowserState* context) const {
109 return GetBrowserStateRedirectedInIncognito(context); 109 return GetBrowserStateRedirectedInIncognito(context);
110 } 110 }
111 111
112 bool WebDataServiceFactory::ServiceIsNULLWhileTesting() const { 112 bool WebDataServiceFactory::ServiceIsNULLWhileTesting() const {
113 return true; 113 return true;
114 } 114 }
115 115
116 } // namespace ios 116 } // namespace ios
OLDNEW
« no previous file with comments | « ios/chrome/browser/web_data_service_factory.h ('k') | ios/public/test/fake_sync_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698