| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "sync/internal_api/public/write_node.h" | 5 #include "sync/internal_api/public/write_node.h" |
| 6 | 6 |
| 7 #include "base/strings/string_util.h" | 7 #include "base/strings/string_util.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "sync/internal_api/public/base_transaction.h" | 10 #include "sync/internal_api/public/base_transaction.h" |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 return true; | 457 return true; |
| 458 } | 458 } |
| 459 } | 459 } |
| 460 | 460 |
| 461 entry_->PutParentId(new_parent_id); | 461 entry_->PutParentId(new_parent_id); |
| 462 | 462 |
| 463 // Now set the predecessor, which sets IS_UNSYNCED as necessary. | 463 // Now set the predecessor, which sets IS_UNSYNCED as necessary. |
| 464 return PutPredecessor(predecessor); | 464 return PutPredecessor(predecessor); |
| 465 } | 465 } |
| 466 | 466 |
| 467 void WriteNode::SetAttachmentMetadata( |
| 468 const sync_pb::AttachmentMetadata& attachment_metadata) { |
| 469 entry_->PutAttachmentMetadata(attachment_metadata); |
| 470 } |
| 471 |
| 467 const syncable::Entry* WriteNode::GetEntry() const { | 472 const syncable::Entry* WriteNode::GetEntry() const { |
| 468 return entry_; | 473 return entry_; |
| 469 } | 474 } |
| 470 | 475 |
| 471 const BaseTransaction* WriteNode::GetTransaction() const { | 476 const BaseTransaction* WriteNode::GetTransaction() const { |
| 472 return transaction_; | 477 return transaction_; |
| 473 } | 478 } |
| 474 | 479 |
| 475 syncable::MutableEntry* WriteNode::GetMutableEntryForTest() { | 480 syncable::MutableEntry* WriteNode::GetMutableEntryForTest() { |
| 476 return entry_; | 481 return entry_; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 499 MarkForSyncing(); | 504 MarkForSyncing(); |
| 500 | 505 |
| 501 return true; | 506 return true; |
| 502 } | 507 } |
| 503 | 508 |
| 504 void WriteNode::MarkForSyncing() { | 509 void WriteNode::MarkForSyncing() { |
| 505 syncable::MarkForSyncing(entry_); | 510 syncable::MarkForSyncing(entry_); |
| 506 } | 511 } |
| 507 | 512 |
| 508 } // namespace syncer | 513 } // namespace syncer |
| OLD | NEW |