| 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 #ifndef COMPONENTS_BROWSER_SYNC_BROWSER_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__ | 5 #ifndef COMPONENTS_BROWSER_SYNC_BROWSER_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__ |
| 6 #define COMPONENTS_BROWSER_SYNC_BROWSER_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__ | 6 #define COMPONENTS_BROWSER_SYNC_BROWSER_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 std::unique_ptr<syncer::AttachmentStoreForSync> attachment_store, | 81 std::unique_ptr<syncer::AttachmentStoreForSync> attachment_store, |
| 82 const syncer::UserShare& user_share, | 82 const syncer::UserShare& user_share, |
| 83 const std::string& store_birthday, | 83 const std::string& store_birthday, |
| 84 syncer::ModelType model_type, | 84 syncer::ModelType model_type, |
| 85 syncer::AttachmentService::Delegate* delegate) override; | 85 syncer::AttachmentService::Delegate* delegate) override; |
| 86 sync_driver::SyncApiComponentFactory::SyncComponents | 86 sync_driver::SyncApiComponentFactory::SyncComponents |
| 87 CreateBookmarkSyncComponents( | 87 CreateBookmarkSyncComponents( |
| 88 sync_driver::SyncService* sync_service, | 88 sync_driver::SyncService* sync_service, |
| 89 std::unique_ptr<syncer::DataTypeErrorHandler> error_handler) override; | 89 std::unique_ptr<syncer::DataTypeErrorHandler> error_handler) override; |
| 90 | 90 |
| 91 // Sets a bit that determines whether PREFERENCES should be registered with a |
| 92 // ModelTypeController for testing purposes. |
| 93 static void OverridePrefsForUssTest(bool use_uss); |
| 94 |
| 91 private: | 95 private: |
| 92 // Register data types which are enabled on both desktop and mobile. | 96 // Register data types which are enabled on both desktop and mobile. |
| 93 // |disabled_types| and |enabled_types| correspond only to those types | 97 // |disabled_types| and |enabled_types| correspond only to those types |
| 94 // being explicitly enabled/disabled by the command line. | 98 // being explicitly enabled/disabled by the command line. |
| 95 void RegisterCommonDataTypes(sync_driver::SyncService* sync_service, | 99 void RegisterCommonDataTypes(sync_driver::SyncService* sync_service, |
| 96 syncer::ModelTypeSet disabled_types, | 100 syncer::ModelTypeSet disabled_types, |
| 97 syncer::ModelTypeSet enabled_types); | 101 syncer::ModelTypeSet enabled_types); |
| 98 | 102 |
| 99 void DisableBrokenType(syncer::ModelType type, | 103 void DisableBrokenType(syncer::ModelType type, |
| 100 const tracked_objects::Location& from_here, | 104 const tracked_objects::Location& from_here, |
| 101 const std::string& message); | 105 const std::string& message); |
| 102 | 106 |
| 103 // Client/platform specific members. | 107 // Client/platform specific members. |
| 104 sync_driver::SyncClient* const sync_client_; | 108 sync_driver::SyncClient* const sync_client_; |
| 105 const version_info::Channel channel_; | 109 const version_info::Channel channel_; |
| 106 const std::string version_; | 110 const std::string version_; |
| 107 const bool is_tablet_; | 111 const bool is_tablet_; |
| 108 const base::CommandLine command_line_; | 112 const base::CommandLine command_line_; |
| 109 const char* history_disabled_pref_; | 113 const char* history_disabled_pref_; |
| 110 const GURL sync_service_url_; | 114 const GURL sync_service_url_; |
| 111 const scoped_refptr<base::SingleThreadTaskRunner> ui_thread_; | 115 const scoped_refptr<base::SingleThreadTaskRunner> ui_thread_; |
| 112 const scoped_refptr<base::SingleThreadTaskRunner> db_thread_; | 116 const scoped_refptr<base::SingleThreadTaskRunner> db_thread_; |
| 113 OAuth2TokenService* const token_service_; | 117 OAuth2TokenService* const token_service_; |
| 114 net::URLRequestContextGetter* const url_request_context_getter_; | 118 net::URLRequestContextGetter* const url_request_context_getter_; |
| 115 const scoped_refptr<autofill::AutofillWebDataService> web_data_service_; | 119 const scoped_refptr<autofill::AutofillWebDataService> web_data_service_; |
| 116 const scoped_refptr<password_manager::PasswordStore> password_store_; | 120 const scoped_refptr<password_manager::PasswordStore> password_store_; |
| 117 | 121 |
| 118 base::WeakPtrFactory<ProfileSyncComponentsFactoryImpl> weak_factory_; | 122 base::WeakPtrFactory<ProfileSyncComponentsFactoryImpl> weak_factory_; |
| 119 | 123 |
| 124 // Whether to override PREFERENCES to use USS. |
| 125 static bool override_prefs_controller_to_uss_for_test_; |
| 126 |
| 120 DISALLOW_COPY_AND_ASSIGN(ProfileSyncComponentsFactoryImpl); | 127 DISALLOW_COPY_AND_ASSIGN(ProfileSyncComponentsFactoryImpl); |
| 121 }; | 128 }; |
| 122 | 129 |
| 123 #endif // COMPONENTS_BROWSER_SYNC_BROWSER_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_
H__ | 130 #endif // COMPONENTS_BROWSER_SYNC_BROWSER_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_
H__ |
| OLD | NEW |