Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: sync/internal_api/write_node.cc

Issue 264793007: Keep track of which attachments are referenced by which sync entries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix memory leak. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/internal_api/sync_manager_impl_unittest.cc ('k') | sync/protocol/attachments.proto » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « sync/internal_api/sync_manager_impl_unittest.cc ('k') | sync/protocol/attachments.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698