| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef COMPONENTS_WEBDATA_SERVICES_WEB_DATA_SERVICE_WRAPPER_H_ | 5 #ifndef COMPONENTS_WEBDATA_SERVICES_WEB_DATA_SERVICE_WRAPPER_H_ |
| 6 #define COMPONENTS_WEBDATA_SERVICES_WEB_DATA_SERVICE_WRAPPER_H_ | 6 #define COMPONENTS_WEBDATA_SERVICES_WEB_DATA_SERVICE_WRAPPER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 14 #include "components/keyed_service/core/keyed_service.h" | 14 #include "components/keyed_service/core/keyed_service.h" |
| 15 #include "components/sync/model/syncable_service.h" | 15 #include "components/sync/model/syncable_service.h" |
| 16 #include "components/version_info/version_info.h" |
| 16 #include "sql/init_status.h" | 17 #include "sql/init_status.h" |
| 17 | 18 |
| 18 class KeywordWebDataService; | 19 class KeywordWebDataService; |
| 19 class TokenWebData; | 20 class TokenWebData; |
| 20 class WebDatabaseService; | 21 class WebDatabaseService; |
| 21 | 22 |
| 22 #if defined(OS_WIN) | 23 #if defined(OS_WIN) |
| 23 class PasswordWebDataService; | 24 class PasswordWebDataService; |
| 24 #endif | 25 #endif |
| 25 | 26 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 // WebDataServices and starts the synchronization services using |flare|. | 59 // WebDataServices and starts the synchronization services using |flare|. |
| 59 // Since |flare| will be copied and called multiple times, it cannot bind | 60 // Since |flare| will be copied and called multiple times, it cannot bind |
| 60 // values using base::Owned nor base::Passed; it should only bind simple or | 61 // values using base::Owned nor base::Passed; it should only bind simple or |
| 61 // refcounted types. | 62 // refcounted types. |
| 62 WebDataServiceWrapper( | 63 WebDataServiceWrapper( |
| 63 const base::FilePath& context_path, | 64 const base::FilePath& context_path, |
| 64 const std::string& application_locale, | 65 const std::string& application_locale, |
| 65 const scoped_refptr<base::SingleThreadTaskRunner>& ui_thread, | 66 const scoped_refptr<base::SingleThreadTaskRunner>& ui_thread, |
| 66 const scoped_refptr<base::SingleThreadTaskRunner>& db_thread, | 67 const scoped_refptr<base::SingleThreadTaskRunner>& db_thread, |
| 67 const syncer::SyncableService::StartSyncFlare& flare, | 68 const syncer::SyncableService::StartSyncFlare& flare, |
| 68 const ShowErrorCallback& show_error_callback); | 69 const ShowErrorCallback& show_error_callback, |
| 70 version_info::Channel channel); |
| 69 ~WebDataServiceWrapper() override; | 71 ~WebDataServiceWrapper() override; |
| 70 | 72 |
| 71 // KeyedService: | 73 // KeyedService: |
| 72 void Shutdown() override; | 74 void Shutdown() override; |
| 73 | 75 |
| 74 // Create the various types of service instances. These methods are virtual | 76 // Create the various types of service instances. These methods are virtual |
| 75 // for testing purpose. | 77 // for testing purpose. |
| 76 virtual scoped_refptr<autofill::AutofillWebDataService> GetAutofillWebData(); | 78 virtual scoped_refptr<autofill::AutofillWebDataService> GetAutofillWebData(); |
| 77 virtual scoped_refptr<KeywordWebDataService> GetKeywordWebData(); | 79 virtual scoped_refptr<KeywordWebDataService> GetKeywordWebData(); |
| 78 virtual scoped_refptr<TokenWebData> GetTokenWebData(); | 80 virtual scoped_refptr<TokenWebData> GetTokenWebData(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 92 scoped_refptr<TokenWebData> token_web_data_; | 94 scoped_refptr<TokenWebData> token_web_data_; |
| 93 | 95 |
| 94 #if defined(OS_WIN) | 96 #if defined(OS_WIN) |
| 95 scoped_refptr<PasswordWebDataService> password_web_data_; | 97 scoped_refptr<PasswordWebDataService> password_web_data_; |
| 96 #endif | 98 #endif |
| 97 | 99 |
| 98 DISALLOW_COPY_AND_ASSIGN(WebDataServiceWrapper); | 100 DISALLOW_COPY_AND_ASSIGN(WebDataServiceWrapper); |
| 99 }; | 101 }; |
| 100 | 102 |
| 101 #endif // COMPONENTS_WEBDATA_SERVICES_WEB_DATA_SERVICE_WRAPPER_H_ | 103 #endif // COMPONENTS_WEBDATA_SERVICES_WEB_DATA_SERVICE_WRAPPER_H_ |
| OLD | NEW |