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" |
11 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
12 #include "chrome/browser/profiles/incognito_helpers.h" | 12 #include "chrome/browser/profiles/incognito_helpers.h" |
13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/browser/profiles/sql_init_error_message_ids.h" | 14 #include "chrome/browser/profiles/sql_init_error_message_ids.h" |
15 #include "chrome/browser/sync/glue/sync_start_util.h" | 15 #include "chrome/browser/sync/glue/sync_start_util.h" |
16 #include "chrome/browser/ui/profile_error_dialog.h" | 16 #include "chrome/browser/ui/profile_error_dialog.h" |
| 17 #include "chrome/common/channel_info.h" |
17 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 18 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
18 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 19 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
19 #include "components/search_engines/keyword_web_data_service.h" | 20 #include "components/search_engines/keyword_web_data_service.h" |
20 #include "components/signin/core/browser/webdata/token_web_data.h" | 21 #include "components/signin/core/browser/webdata/token_web_data.h" |
21 #include "components/webdata_services/web_data_service_wrapper.h" | 22 #include "components/webdata_services/web_data_service_wrapper.h" |
22 #include "content/public/browser/browser_thread.h" | 23 #include "content/public/browser/browser_thread.h" |
23 | 24 |
24 #if defined(OS_WIN) | 25 #if defined(OS_WIN) |
25 #include "components/password_manager/core/browser/webdata/password_web_data_ser
vice_win.h" | 26 #include "components/password_manager/core/browser/webdata/password_web_data_ser
vice_win.h" |
26 #endif | 27 #endif |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 } | 162 } |
162 | 163 |
163 KeyedService* WebDataServiceFactory::BuildServiceInstanceFor( | 164 KeyedService* WebDataServiceFactory::BuildServiceInstanceFor( |
164 content::BrowserContext* context) const { | 165 content::BrowserContext* context) const { |
165 const base::FilePath& profile_path = context->GetPath(); | 166 const base::FilePath& profile_path = context->GetPath(); |
166 return new WebDataServiceWrapper( | 167 return new WebDataServiceWrapper( |
167 profile_path, g_browser_process->GetApplicationLocale(), | 168 profile_path, g_browser_process->GetApplicationLocale(), |
168 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), | 169 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), |
169 BrowserThread::GetTaskRunnerForThread(BrowserThread::DB), | 170 BrowserThread::GetTaskRunnerForThread(BrowserThread::DB), |
170 sync_start_util::GetFlareForSyncableService(profile_path), | 171 sync_start_util::GetFlareForSyncableService(profile_path), |
171 &ProfileErrorCallback); | 172 &ProfileErrorCallback, chrome::GetChannel()); |
172 } | 173 } |
173 | 174 |
174 bool WebDataServiceFactory::ServiceIsNULLWhileTesting() const { | 175 bool WebDataServiceFactory::ServiceIsNULLWhileTesting() const { |
175 return true; | 176 return true; |
176 } | 177 } |
OLD | NEW |