OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_DRIVER_GENERIC_CHANGE_PROCESSOR_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_H_ |
6 #define COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_H_ | 6 #define COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // | 127 // |
128 // |new_attachments| is an output parameter containing newly added attachments | 128 // |new_attachments| is an output parameter containing newly added attachments |
129 // that need to be stored. This method will append to it. | 129 // that need to be stored. This method will append to it. |
130 syncer::SyncError HandleActionUpdate( | 130 syncer::SyncError HandleActionUpdate( |
131 const syncer::SyncChange& change, | 131 const syncer::SyncChange& change, |
132 const std::string& type_str, | 132 const std::string& type_str, |
133 const syncer::WriteTransaction& trans, | 133 const syncer::WriteTransaction& trans, |
134 syncer::WriteNode* sync_node, | 134 syncer::WriteNode* sync_node, |
135 syncer::AttachmentIdSet* new_attachments); | 135 syncer::AttachmentIdSet* new_attachments); |
136 | 136 |
| 137 // Handle decryption error encountered when reading existing entry. This |
| 138 // helper funciton is used in HandleActionAdd and HandleActionUpdate. |
| 139 syncer::SyncError HandleDecryptionError(const std::string& type_str, |
| 140 const syncer::WriteTransaction& trans, |
| 141 syncer::WriteNode* sync_node); |
| 142 |
137 // Begin uploading attachments that have not yet been uploaded to the sync | 143 // Begin uploading attachments that have not yet been uploaded to the sync |
138 // server. | 144 // server. |
139 void UploadAllAttachmentsNotOnServer(); | 145 void UploadAllAttachmentsNotOnServer(); |
140 | 146 |
141 const syncer::ModelType type_; | 147 const syncer::ModelType type_; |
142 | 148 |
143 // The SyncableService this change processor will forward changes on to. | 149 // The SyncableService this change processor will forward changes on to. |
144 const base::WeakPtr<syncer::SyncableService> local_service_; | 150 const base::WeakPtr<syncer::SyncableService> local_service_; |
145 | 151 |
146 // A SyncMergeResult used to track the changes made during association. The | 152 // A SyncMergeResult used to track the changes made during association. The |
(...skipping 26 matching lines...) Expand all Loading... |
173 attachment_service_weak_ptr_factory_; | 179 attachment_service_weak_ptr_factory_; |
174 syncer::AttachmentServiceProxy attachment_service_proxy_; | 180 syncer::AttachmentServiceProxy attachment_service_proxy_; |
175 base::WeakPtrFactory<GenericChangeProcessor> weak_ptr_factory_; | 181 base::WeakPtrFactory<GenericChangeProcessor> weak_ptr_factory_; |
176 | 182 |
177 DISALLOW_COPY_AND_ASSIGN(GenericChangeProcessor); | 183 DISALLOW_COPY_AND_ASSIGN(GenericChangeProcessor); |
178 }; | 184 }; |
179 | 185 |
180 } // namespace sync_driver | 186 } // namespace sync_driver |
181 | 187 |
182 #endif // COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_H_ | 188 #endif // COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_H_ |
OLD | NEW |