| 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_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__ | 5 #ifndef COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__ |
| 6 #define COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__ | 6 #define COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 } | 25 } |
| 26 | 26 |
| 27 namespace password_manager { | 27 namespace password_manager { |
| 28 class PasswordStore; | 28 class PasswordStore; |
| 29 } | 29 } |
| 30 | 30 |
| 31 namespace net { | 31 namespace net { |
| 32 class URLRequestContextGetter; | 32 class URLRequestContextGetter; |
| 33 } | 33 } |
| 34 | 34 |
| 35 namespace browser_sync { |
| 36 |
| 35 class ProfileSyncComponentsFactoryImpl | 37 class ProfileSyncComponentsFactoryImpl |
| 36 : public sync_driver::SyncApiComponentFactory { | 38 : public sync_driver::SyncApiComponentFactory { |
| 37 public: | 39 public: |
| 38 // Constructs a ProfileSyncComponentsFactoryImpl. | 40 // Constructs a ProfileSyncComponentsFactoryImpl. |
| 39 // | 41 // |
| 40 // |sync_service_url| is the base URL of the sync server. | 42 // |sync_service_url| is the base URL of the sync server. |
| 41 // | 43 // |
| 42 // |token_service| must outlive the ProfileSyncComponentsFactoryImpl. | 44 // |token_service| must outlive the ProfileSyncComponentsFactoryImpl. |
| 43 // | 45 // |
| 44 // |url_request_context_getter| must outlive the | 46 // |url_request_context_getter| must outlive the |
| (...skipping 16 matching lines...) Expand all Loading... |
| 61 | 63 |
| 62 // SyncApiComponentFactory implementation: | 64 // SyncApiComponentFactory implementation: |
| 63 void RegisterDataTypes( | 65 void RegisterDataTypes( |
| 64 sync_driver::SyncService* sync_service, | 66 sync_driver::SyncService* sync_service, |
| 65 const RegisterDataTypesMethod& register_platform_types_method) override; | 67 const RegisterDataTypesMethod& register_platform_types_method) override; |
| 66 sync_driver::DataTypeManager* CreateDataTypeManager( | 68 sync_driver::DataTypeManager* CreateDataTypeManager( |
| 67 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& | 69 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& |
| 68 debug_info_listener, | 70 debug_info_listener, |
| 69 const sync_driver::DataTypeController::TypeMap* controllers, | 71 const sync_driver::DataTypeController::TypeMap* controllers, |
| 70 const sync_driver::DataTypeEncryptionHandler* encryption_handler, | 72 const sync_driver::DataTypeEncryptionHandler* encryption_handler, |
| 71 browser_sync::SyncBackendHost* backend, | 73 SyncBackendHost* backend, |
| 72 sync_driver::DataTypeManagerObserver* observer) override; | 74 sync_driver::DataTypeManagerObserver* observer) override; |
| 73 browser_sync::SyncBackendHost* CreateSyncBackendHost( | 75 SyncBackendHost* CreateSyncBackendHost( |
| 74 const std::string& name, | 76 const std::string& name, |
| 75 invalidation::InvalidationService* invalidator, | 77 invalidation::InvalidationService* invalidator, |
| 76 const base::WeakPtr<sync_driver::SyncPrefs>& sync_prefs, | 78 const base::WeakPtr<sync_driver::SyncPrefs>& sync_prefs, |
| 77 const base::FilePath& sync_folder) override; | 79 const base::FilePath& sync_folder) override; |
| 78 std::unique_ptr<sync_driver::LocalDeviceInfoProvider> | 80 std::unique_ptr<sync_driver::LocalDeviceInfoProvider> |
| 79 CreateLocalDeviceInfoProvider() override; | 81 CreateLocalDeviceInfoProvider() override; |
| 80 std::unique_ptr<syncer::AttachmentService> CreateAttachmentService( | 82 std::unique_ptr<syncer::AttachmentService> CreateAttachmentService( |
| 81 std::unique_ptr<syncer::AttachmentStoreForSync> attachment_store, | 83 std::unique_ptr<syncer::AttachmentStoreForSync> attachment_store, |
| 82 const syncer::UserShare& user_share, | 84 const syncer::UserShare& user_share, |
| 83 const std::string& store_birthday, | 85 const std::string& store_birthday, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 const scoped_refptr<password_manager::PasswordStore> password_store_; | 122 const scoped_refptr<password_manager::PasswordStore> password_store_; |
| 121 | 123 |
| 122 base::WeakPtrFactory<ProfileSyncComponentsFactoryImpl> weak_factory_; | 124 base::WeakPtrFactory<ProfileSyncComponentsFactoryImpl> weak_factory_; |
| 123 | 125 |
| 124 // Whether to override PREFERENCES to use USS. | 126 // Whether to override PREFERENCES to use USS. |
| 125 static bool override_prefs_controller_to_uss_for_test_; | 127 static bool override_prefs_controller_to_uss_for_test_; |
| 126 | 128 |
| 127 DISALLOW_COPY_AND_ASSIGN(ProfileSyncComponentsFactoryImpl); | 129 DISALLOW_COPY_AND_ASSIGN(ProfileSyncComponentsFactoryImpl); |
| 128 }; | 130 }; |
| 129 | 131 |
| 132 } // namespace browser_sync |
| 133 |
| 130 #endif // COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__ | 134 #endif // COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__ |
| OLD | NEW |