| 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 SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 5 #ifndef SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
| 6 #define SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 6 #define SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 bool use_ssl, | 39 bool use_ssl, |
| 40 const scoped_refptr<base::TaskRunner>& blocking_task_runner, | 40 const scoped_refptr<base::TaskRunner>& blocking_task_runner, |
| 41 scoped_ptr<HttpPostProviderFactory> post_factory, | 41 scoped_ptr<HttpPostProviderFactory> post_factory, |
| 42 const syncer::ModelSafeRoutingInfo& model_safe_routing_info, | 42 const syncer::ModelSafeRoutingInfo& model_safe_routing_info, |
| 43 const std::vector<syncer::ModelSafeWorker*>& workers, | 43 const std::vector<syncer::ModelSafeWorker*>& workers, |
| 44 syncer::ExtensionsActivityMonitor* extensions_activity_monitor, | 44 syncer::ExtensionsActivityMonitor* extensions_activity_monitor, |
| 45 SyncManager::ChangeDelegate* change_delegate, | 45 SyncManager::ChangeDelegate* change_delegate, |
| 46 const SyncCredentials& credentials, | 46 const SyncCredentials& credentials, |
| 47 scoped_ptr<syncer::SyncNotifier> sync_notifier, | 47 scoped_ptr<syncer::SyncNotifier> sync_notifier, |
| 48 const std::string& restored_key_for_bootstrapping, | 48 const std::string& restored_key_for_bootstrapping, |
| 49 TestingMode testing_mode, | 49 scoped_ptr<InternalComponentsFactory> internal_components_factory, |
| 50 syncer::Encryptor* encryptor, | 50 syncer::Encryptor* encryptor, |
| 51 syncer::UnrecoverableErrorHandler* unrecoverable_error_handler, | 51 syncer::UnrecoverableErrorHandler* unrecoverable_error_handler, |
| 52 syncer::ReportUnrecoverableErrorFunction | 52 syncer::ReportUnrecoverableErrorFunction |
| 53 report_unrecoverable_error_function) OVERRIDE; | 53 report_unrecoverable_error_function) OVERRIDE; |
| 54 virtual void ThrowUnrecoverableError() OVERRIDE; | 54 virtual void ThrowUnrecoverableError() OVERRIDE; |
| 55 virtual syncer::ModelTypeSet InitialSyncEndedTypes() OVERRIDE; | 55 virtual syncer::ModelTypeSet InitialSyncEndedTypes() OVERRIDE; |
| 56 virtual syncer::ModelTypeSet GetTypesWithEmptyProgressMarkerToken( | 56 virtual syncer::ModelTypeSet GetTypesWithEmptyProgressMarkerToken( |
| 57 syncer::ModelTypeSet types) OVERRIDE; | 57 syncer::ModelTypeSet types) OVERRIDE; |
| 58 virtual bool PurgePartiallySyncedTypes() OVERRIDE; | 58 virtual bool PurgePartiallySyncedTypes() OVERRIDE; |
| 59 virtual void UpdateCredentials(const SyncCredentials& credentials) OVERRIDE; | 59 virtual void UpdateCredentials(const SyncCredentials& credentials) OVERRIDE; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 static int GetPreferencesNudgeDelay(); | 103 static int GetPreferencesNudgeDelay(); |
| 104 | 104 |
| 105 private: | 105 private: |
| 106 friend class SyncManagerTest; | 106 friend class SyncManagerTest; |
| 107 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, NudgeDelayTest); | 107 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, NudgeDelayTest); |
| 108 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, OnNotificationStateChange); | 108 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, OnNotificationStateChange); |
| 109 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, OnIncomingNotification); | 109 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, OnIncomingNotification); |
| 110 | 110 |
| 111 base::TimeDelta GetNudgeDelayTimeDelta(const syncer::ModelType& model_type); | 111 base::TimeDelta GetNudgeDelayTimeDelta(const syncer::ModelType& model_type); |
| 112 | 112 |
| 113 // Set the internal scheduler for testing purposes. | |
| 114 // TODO(sync): Use dependency injection instead. crbug.com/133061 | |
| 115 void SetSyncSchedulerForTest( | |
| 116 scoped_ptr<syncer::SyncScheduler> scheduler); | |
| 117 | |
| 118 base::ThreadChecker thread_checker_; | 113 base::ThreadChecker thread_checker_; |
| 119 | 114 |
| 120 // An opaque pointer to the nested private class. | 115 // An opaque pointer to the nested private class. |
| 121 SyncInternal* data_; | 116 SyncInternal* data_; |
| 122 | 117 |
| 123 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); | 118 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); |
| 124 }; | 119 }; |
| 125 | 120 |
| 126 } // namespace syncer | 121 } // namespace syncer |
| 127 | 122 |
| 128 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 123 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
| OLD | NEW |