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/webdata/web_data_service_factory.h" | 5 #include "chrome/browser/webdata/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 "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/profiles/incognito_helpers.h" | 10 #include "chrome/browser/profiles/incognito_helpers.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "components/autofill/core/browser/autofill_country.h" | 22 #include "components/autofill/core/browser/autofill_country.h" |
23 #include "components/autofill/core/browser/webdata/autofill_table.h" | 23 #include "components/autofill/core/browser/webdata/autofill_table.h" |
24 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 24 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
25 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" | 25 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" |
26 #include "components/webdata/common/webdata_constants.h" | 26 #include "components/webdata/common/webdata_constants.h" |
27 #include "content/public/browser/browser_thread.h" | 27 #include "content/public/browser/browser_thread.h" |
28 #include "grit/chromium_strings.h" | 28 #include "grit/chromium_strings.h" |
29 #include "grit/generated_resources.h" | 29 #include "grit/generated_resources.h" |
30 | 30 |
31 using autofill::AutofillWebDataService; | 31 using autofill::AutofillWebDataService; |
| 32 using autofill::AutofillProfileSyncableService; |
32 using content::BrowserThread; | 33 using content::BrowserThread; |
33 | 34 |
34 namespace { | 35 namespace { |
35 | 36 |
36 // Callback to show error dialog on profile load error. | 37 // Callback to show error dialog on profile load error. |
37 void ProfileErrorCallback(ProfileErrorType type, sql::InitStatus status) { | 38 void ProfileErrorCallback(ProfileErrorType type, sql::InitStatus status) { |
38 ShowProfileErrorDialog( | 39 ShowProfileErrorDialog( |
39 type, | 40 type, |
40 (status == sql::INIT_FAILURE) ? | 41 (status == sql::INIT_FAILURE) ? |
41 IDS_COULDNT_OPEN_PROFILE_ERROR : IDS_PROFILE_TOO_NEW_ERROR); | 42 IDS_COULDNT_OPEN_PROFILE_ERROR : IDS_PROFILE_TOO_NEW_ERROR); |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 } | 232 } |
232 | 233 |
233 BrowserContextKeyedService* WebDataServiceFactory::BuildServiceInstanceFor( | 234 BrowserContextKeyedService* WebDataServiceFactory::BuildServiceInstanceFor( |
234 content::BrowserContext* profile) const { | 235 content::BrowserContext* profile) const { |
235 return new WebDataServiceWrapper(static_cast<Profile*>(profile)); | 236 return new WebDataServiceWrapper(static_cast<Profile*>(profile)); |
236 } | 237 } |
237 | 238 |
238 bool WebDataServiceFactory::ServiceIsNULLWhileTesting() const { | 239 bool WebDataServiceFactory::ServiceIsNULLWhileTesting() const { |
239 return true; | 240 return true; |
240 } | 241 } |
OLD | NEW |