| 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_API_FAKE_SYNCABLE_SERVICE_H_ | 5 #ifndef SYNC_API_FAKE_SYNCABLE_SERVICE_H_ |
| 6 #define SYNC_API_FAKE_SYNCABLE_SERVICE_H_ | 6 #define SYNC_API_FAKE_SYNCABLE_SERVICE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "sync/api/syncable_service.h" | 9 #include "sync/api/syncable_service.h" |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 // Setters for SyncableService implementation results. | 22 // Setters for SyncableService implementation results. |
| 23 void set_merge_data_and_start_syncing_error(const SyncError& error); | 23 void set_merge_data_and_start_syncing_error(const SyncError& error); |
| 24 void set_process_sync_changes_error(const SyncError& error); | 24 void set_process_sync_changes_error(const SyncError& error); |
| 25 | 25 |
| 26 // Whether we're syncing or not. Set on a successful MergeDataAndStartSyncing, | 26 // Whether we're syncing or not. Set on a successful MergeDataAndStartSyncing, |
| 27 // unset on StopSyncing. False by default. | 27 // unset on StopSyncing. False by default. |
| 28 bool syncing() const; | 28 bool syncing() const; |
| 29 | 29 |
| 30 // SyncableService implementation. | 30 // SyncableService implementation. |
| 31 virtual SyncError MergeDataAndStartSyncing( | 31 virtual SyncError MergeDataAndStartSyncing( |
| 32 syncable::ModelType type, | 32 syncer::ModelType type, |
| 33 const SyncDataList& initial_sync_data, | 33 const SyncDataList& initial_sync_data, |
| 34 scoped_ptr<SyncChangeProcessor> sync_processor, | 34 scoped_ptr<SyncChangeProcessor> sync_processor, |
| 35 scoped_ptr<SyncErrorFactory> sync_error_factory) OVERRIDE; | 35 scoped_ptr<SyncErrorFactory> sync_error_factory) OVERRIDE; |
| 36 virtual void StopSyncing(syncable::ModelType type) OVERRIDE; | 36 virtual void StopSyncing(syncer::ModelType type) OVERRIDE; |
| 37 virtual SyncDataList GetAllSyncData(syncable::ModelType type) const OVERRIDE; | 37 virtual SyncDataList GetAllSyncData(syncer::ModelType type) const OVERRIDE; |
| 38 virtual SyncError ProcessSyncChanges( | 38 virtual SyncError ProcessSyncChanges( |
| 39 const tracked_objects::Location& from_here, | 39 const tracked_objects::Location& from_here, |
| 40 const SyncChangeList& change_list) OVERRIDE; | 40 const SyncChangeList& change_list) OVERRIDE; |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 scoped_ptr<SyncChangeProcessor> sync_processor_; | 43 scoped_ptr<SyncChangeProcessor> sync_processor_; |
| 44 SyncError merge_data_and_start_syncing_error_; | 44 SyncError merge_data_and_start_syncing_error_; |
| 45 SyncError process_sync_changes_error_; | 45 SyncError process_sync_changes_error_; |
| 46 bool syncing_; | 46 bool syncing_; |
| 47 syncable::ModelType type_; | 47 syncer::ModelType type_; |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 } // namespace syncer | 50 } // namespace syncer |
| 51 | 51 |
| 52 #endif // SYNC_API_FAKE_SYNCABLE_SERVICE_H_ | 52 #endif // SYNC_API_FAKE_SYNCABLE_SERVICE_H_ |
| OLD | NEW |