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 | |
472 const syncable::Entry* WriteNode::GetEntry() const { | 467 const syncable::Entry* WriteNode::GetEntry() const { |
473 return entry_; | 468 return entry_; |
474 } | 469 } |
475 | 470 |
476 const BaseTransaction* WriteNode::GetTransaction() const { | 471 const BaseTransaction* WriteNode::GetTransaction() const { |
477 return transaction_; | 472 return transaction_; |
478 } | 473 } |
479 | 474 |
480 syncable::MutableEntry* WriteNode::GetMutableEntryForTest() { | 475 syncable::MutableEntry* WriteNode::GetMutableEntryForTest() { |
481 return entry_; | 476 return entry_; |
(...skipping 22 matching lines...) Expand all Loading... |
504 MarkForSyncing(); | 499 MarkForSyncing(); |
505 | 500 |
506 return true; | 501 return true; |
507 } | 502 } |
508 | 503 |
509 void WriteNode::MarkForSyncing() { | 504 void WriteNode::MarkForSyncing() { |
510 syncable::MarkForSyncing(entry_); | 505 syncable::MarkForSyncing(entry_); |
511 } | 506 } |
512 | 507 |
513 } // namespace syncer | 508 } // namespace syncer |
OLD | NEW |