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 #include "components/sync_driver/generic_change_processor.h" | 5 #include "components/sync_driver/generic_change_processor.h" |
6 | 6 |
7 #include "base/location.h" | 7 #include "base/location.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "components/sync_driver/sync_api_component_factory.h" | 10 #include "components/sync_driver/sync_api_component_factory.h" |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 | 207 |
208 // TODO(zea): plumb a pointer to the PSS or SyncManagerImpl here so we can | 208 // TODO(zea): plumb a pointer to the PSS or SyncManagerImpl here so we can |
209 // trigger a datatype nudge if |refresh_status == REFRESH_NEEDED|. | 209 // trigger a datatype nudge if |refresh_status == REFRESH_NEEDED|. |
210 | 210 |
211 return syncer::SyncError(); | 211 return syncer::SyncError(); |
212 } | 212 } |
213 | 213 |
214 void GenericChangeProcessor::OnAttachmentUploaded( | 214 void GenericChangeProcessor::OnAttachmentUploaded( |
215 const syncer::AttachmentId& attachment_id) { | 215 const syncer::AttachmentId& attachment_id) { |
216 syncer::WriteTransaction trans(FROM_HERE, share_handle()); | 216 syncer::WriteTransaction trans(FROM_HERE, share_handle()); |
217 trans.UpdateEntriesWithAttachmentId(attachment_id); | 217 trans.UpdateEntriesMarkAttachmentAsOnServer(attachment_id); |
218 } | 218 } |
219 | 219 |
220 syncer::SyncError GenericChangeProcessor::GetAllSyncDataReturnError( | 220 syncer::SyncError GenericChangeProcessor::GetAllSyncDataReturnError( |
221 syncer::ModelType type, | 221 syncer::ModelType type, |
222 syncer::SyncDataList* current_sync_data) const { | 222 syncer::SyncDataList* current_sync_data) const { |
223 DCHECK(CalledOnValidThread()); | 223 DCHECK(CalledOnValidThread()); |
224 std::string type_name = syncer::ModelTypeToString(type); | 224 std::string type_name = syncer::ModelTypeToString(type); |
225 syncer::ReadTransaction trans(FROM_HERE, share_handle()); | 225 syncer::ReadTransaction trans(FROM_HERE, share_handle()); |
226 syncer::ReadNode root(&trans); | 226 syncer::ReadNode root(&trans); |
227 if (root.InitTypeRoot(type) != syncer::BaseNode::INIT_OK) { | 227 if (root.InitTypeRoot(type) != syncer::BaseNode::INIT_OK) { |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 | 726 |
727 void GenericChangeProcessor::StartImpl() { | 727 void GenericChangeProcessor::StartImpl() { |
728 } | 728 } |
729 | 729 |
730 syncer::UserShare* GenericChangeProcessor::share_handle() const { | 730 syncer::UserShare* GenericChangeProcessor::share_handle() const { |
731 DCHECK(CalledOnValidThread()); | 731 DCHECK(CalledOnValidThread()); |
732 return share_handle_; | 732 return share_handle_; |
733 } | 733 } |
734 | 734 |
735 } // namespace browser_sync | 735 } // namespace browser_sync |
OLD | NEW |