OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/web_data_service_factory.h" | 5 #include "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/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 content::BrowserContext* WebDataServiceFactory::GetBrowserContextToUse( | 160 content::BrowserContext* WebDataServiceFactory::GetBrowserContextToUse( |
161 content::BrowserContext* context) const { | 161 content::BrowserContext* context) const { |
162 return chrome::GetBrowserContextRedirectedInIncognito(context); | 162 return chrome::GetBrowserContextRedirectedInIncognito(context); |
163 } | 163 } |
164 | 164 |
165 KeyedService* WebDataServiceFactory::BuildServiceInstanceFor( | 165 KeyedService* WebDataServiceFactory::BuildServiceInstanceFor( |
166 content::BrowserContext* context) const { | 166 content::BrowserContext* context) const { |
167 const base::FilePath& profile_path = context->GetPath(); | 167 const base::FilePath& profile_path = context->GetPath(); |
168 return new WebDataServiceWrapper( | 168 return new WebDataServiceWrapper( |
169 profile_path, g_browser_process->GetApplicationLocale(), | 169 profile_path, g_browser_process->GetApplicationLocale(), |
170 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), | 170 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), |
171 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB), | 171 BrowserThread::GetTaskRunnerForThread(BrowserThread::DB), |
172 sync_start_util::GetFlareForSyncableService(profile_path), | 172 sync_start_util::GetFlareForSyncableService(profile_path), |
173 &ProfileErrorCallback); | 173 &ProfileErrorCallback); |
174 } | 174 } |
175 | 175 |
176 bool WebDataServiceFactory::ServiceIsNULLWhileTesting() const { | 176 bool WebDataServiceFactory::ServiceIsNULLWhileTesting() const { |
177 return true; | 177 return true; |
178 } | 178 } |
OLD | NEW |