| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_SYNC_SYNCABLE_SERVICE_H_ |
| 6 #define CHROME_BROWSER_SYNC_SYNCABLE_SERVICE_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "chrome/browser/sync/engine/syncapi.h" // TODO(zea): remove this. |
| 10 #include "chrome/browser/sync/glue/model_associator.h" |
| 11 |
| 12 class ProfileSyncService; |
| 13 |
| 14 namespace browser_sync { |
| 15 class GenericChangeProcessor; |
| 16 } |
| 17 |
| 18 // TODO(sync): Define SyncData type for passing sync changes here. |
| 19 |
| 20 // TODO(sync): Have this become an independent class and deprecate |
| 21 // AssociatorInterface. |
| 22 class SyncableService : public browser_sync::AssociatorInterface { |
| 23 public: |
| 24 SyncableService(); |
| 25 virtual ~SyncableService(); |
| 26 |
| 27 // Future methods for SyncableService: |
| 28 // StartSyncing |
| 29 // StopSyncing |
| 30 // GetAllSyncData |
| 31 // ProcessNewSyncData (replaces ApplyChangeFromSync) |
| 32 |
| 33 // TODO(sync): remove these once we switch to the real SyncableService |
| 34 // interface. This just keeps us going while we use the model associator/ |
| 35 // change processor way of things. |
| 36 |
| 37 // AssociatorInterface implementation. |
| 38 virtual bool AssociateModels() = 0; |
| 39 virtual bool DisassociateModels() = 0; |
| 40 virtual bool SyncModelHasUserCreatedNodes(bool* has_nodes) = 0; |
| 41 virtual void AbortAssociation() = 0; |
| 42 virtual bool CryptoReadyIfNecessary() = 0; |
| 43 |
| 44 // Receive changes from change processor (the ChangeRecord dependency is |
| 45 // the reason we must include syncapi.h). |
| 46 virtual void ApplyChangesFromSync( |
| 47 const sync_api::BaseTransaction* trans, |
| 48 const sync_api::SyncManager::ChangeRecord* changes, |
| 49 int change_count) = 0; |
| 50 virtual void SetupSync( |
| 51 ProfileSyncService* sync_service, |
| 52 browser_sync::GenericChangeProcessor* change_processor) = 0; |
| 53 }; |
| 54 |
| 55 #endif // CHROME_BROWSER_SYNC_SYNCABLE_SERVICE_H_ |
| OLD | NEW |