| 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_GLUE_GENERIC_CHANGE_PROCESSOR_H_ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "chrome/browser/sync/glue/change_processor.h" |
| 10 |
| 11 namespace browser_sync { |
| 12 |
| 13 class NewAssociatorInterface; |
| 14 |
| 15 // TODO(zea): extract common change processor functionality into this class |
| 16 // and have all new associator's use it. Eventually we want all sync_api |
| 17 // interaction to happen within this change processor, and have the model |
| 18 // associator's just process protobuf specifics. |
| 19 // For now, it acts as a dummy change processor that just passes all |
| 20 // ApplySyncChanges commands onto it's model associator. |
| 21 class GenericChangeProcessor : public ChangeProcessor { |
| 22 public: |
| 23 GenericChangeProcessor(UnrecoverableErrorHandler* error_handler, |
| 24 NewAssociatorInterface* model_associator); |
| 25 ~GenericChangeProcessor(); |
| 26 |
| 27 // ChangeProcessor interface. |
| 28 // Just passes all arguments onto the |model_associator_| |
| 29 virtual void ApplyChangesFromSyncModel( |
| 30 const sync_api::BaseTransaction* trans, |
| 31 const sync_api::SyncManager::ChangeRecord* changes, |
| 32 int change_count); |
| 33 protected: |
| 34 // ChangeProcessor interface. |
| 35 virtual void StartImpl(Profile* profile); // Not implemented. |
| 36 virtual void StopImpl(); // Not implemented. |
| 37 private: |
| 38 NewAssociatorInterface* model_associator_; |
| 39 }; |
| 40 |
| 41 } // namespace browser_sync |
| 42 |
| 43 #endif // CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_H_ |
| OLD | NEW |