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 SYNC_API_SYNC_CHANGE_PROCESSOR_H_ | 5 #ifndef SYNC_API_SYNC_CHANGE_PROCESSOR_H_ |
6 #define SYNC_API_SYNC_CHANGE_PROCESSOR_H_ | 6 #define SYNC_API_SYNC_CHANGE_PROCESSOR_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "sync/api/sync_data.h" | 10 #include "sync/api/sync_data.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // This is an asynchronous local operation that may result in disk IO. | 56 // This is an asynchronous local operation that may result in disk IO. |
57 // | 57 // |
58 // Refer to sync_data.h for a description of |sync_tag|. | 58 // Refer to sync_data.h for a description of |sync_tag|. |
59 // | 59 // |
60 // TODO:(maniscalco): N.B. this method should really be pure virtual. An | 60 // TODO:(maniscalco): N.B. this method should really be pure virtual. An |
61 // implentation is provided here just to verify that everything compiles. | 61 // implentation is provided here just to verify that everything compiles. |
62 // Update this method to be pure virtual (bug 353300). | 62 // Update this method to be pure virtual (bug 353300). |
63 virtual void GetSyncData(const ModelType& type, | 63 virtual void GetSyncData(const ModelType& type, |
64 const std::string& sync_tag, | 64 const std::string& sync_tag, |
65 const GetSyncDataCallback& callback) const {} | 65 const GetSyncDataCallback& callback) const {} |
| 66 |
| 67 // Updates the context for |type|. Default implementation does nothing. |
| 68 // A type's context is a per-client blob that can affect all SyncData |
| 69 // sent to/from the server, much like a cookie. |
| 70 virtual syncer::SyncError UpdateDataTypeContext(ModelType type, |
| 71 const std::string& context); |
66 }; | 72 }; |
67 | 73 |
68 } // namespace syncer | 74 } // namespace syncer |
69 | 75 |
70 #endif // SYNC_API_SYNC_CHANGE_PROCESSOR_H_ | 76 #endif // SYNC_API_SYNC_CHANGE_PROCESSOR_H_ |
OLD | NEW |