OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |