| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_SYNC_API_SYNC_CHANGE_PROCESSOR_H_ | 5 #ifndef COMPONENTS_SYNC_API_SYNC_CHANGE_PROCESSOR_H_ |
| 6 #define COMPONENTS_SYNC_API_SYNC_CHANGE_PROCESSOR_H_ | 6 #define COMPONENTS_SYNC_API_SYNC_CHANGE_PROCESSOR_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // Update this method to be pure virtual (bug 353300). | 66 // Update this method to be pure virtual (bug 353300). |
| 67 virtual void GetSyncData(const ModelType& type, | 67 virtual void GetSyncData(const ModelType& type, |
| 68 const std::string& sync_tag, | 68 const std::string& sync_tag, |
| 69 const GetSyncDataCallback& callback) const {} | 69 const GetSyncDataCallback& callback) const {} |
| 70 | 70 |
| 71 // Updates the context for |type|, triggering an optional context refresh. | 71 // Updates the context for |type|, triggering an optional context refresh. |
| 72 // Default implementation does nothing. A type's context is a per-client blob | 72 // Default implementation does nothing. A type's context is a per-client blob |
| 73 // that can affect all SyncData sent to/from the server, much like a cookie. | 73 // that can affect all SyncData sent to/from the server, much like a cookie. |
| 74 // TODO(zea): consider pulling the refresh logic into a separate method | 74 // TODO(zea): consider pulling the refresh logic into a separate method |
| 75 // unrelated to datatype implementations. | 75 // unrelated to datatype implementations. |
| 76 virtual SyncError UpdateDataTypeContext(ModelType type, | 76 virtual syncer::SyncError UpdateDataTypeContext( |
| 77 ContextRefreshStatus refresh_status, | 77 ModelType type, |
| 78 const std::string& context); | 78 ContextRefreshStatus refresh_status, |
| 79 const std::string& context); |
| 79 | 80 |
| 80 // Adds an observer of local sync changes. This observer is notified when | 81 // Adds an observer of local sync changes. This observer is notified when |
| 81 // local sync changes are applied by GenericChangeProcessor. observer is | 82 // local sync changes are applied by GenericChangeProcessor. observer is |
| 82 // not owned by the SyncChangeProcessor. | 83 // not owned by the SyncChangeProcessor. |
| 83 virtual void AddLocalChangeObserver(LocalChangeObserver* observer); | 84 virtual void AddLocalChangeObserver(LocalChangeObserver* observer); |
| 84 virtual void RemoveLocalChangeObserver(LocalChangeObserver* observer); | 85 virtual void RemoveLocalChangeObserver(LocalChangeObserver* observer); |
| 85 }; | 86 }; |
| 86 | 87 |
| 87 } // namespace syncer | 88 } // namespace syncer |
| 88 | 89 |
| 89 #endif // COMPONENTS_SYNC_API_SYNC_CHANGE_PROCESSOR_H_ | 90 #endif // COMPONENTS_SYNC_API_SYNC_CHANGE_PROCESSOR_H_ |
| OLD | NEW |