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

Side by Side Diff: sync/syncable/mutable_entry.h

Issue 394293003: Do not update AttachmentIds after uploading attachments to sync server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/syncable/directory_unittest.cc ('k') | sync/syncable/mutable_entry.cc » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef SYNC_SYNCABLE_MUTABLE_ENTRY_H_ 5 #ifndef SYNC_SYNCABLE_MUTABLE_ENTRY_H_
6 #define SYNC_SYNCABLE_MUTABLE_ENTRY_H_ 6 #define SYNC_SYNCABLE_MUTABLE_ENTRY_H_
7 7
8 #include "sync/base/sync_export.h" 8 #include "sync/base/sync_export.h"
9 #include "sync/internal_api/public/base/model_type.h" 9 #include "sync/internal_api/public/base/model_type.h"
10 #include "sync/syncable/entry.h" 10 #include "sync/syncable/entry.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 // Sets the position of this item, and updates the entry kernels of the 56 // Sets the position of this item, and updates the entry kernels of the
57 // adjacent siblings so that list invariants are maintained. Returns false 57 // adjacent siblings so that list invariants are maintained. Returns false
58 // and fails if |predecessor_id| does not identify a sibling. Pass the root 58 // and fails if |predecessor_id| does not identify a sibling. Pass the root
59 // ID to put the node in first position. 59 // ID to put the node in first position.
60 bool PutPredecessor(const Id& predecessor_id); 60 bool PutPredecessor(const Id& predecessor_id);
61 61
62 void PutAttachmentMetadata( 62 void PutAttachmentMetadata(
63 const sync_pb::AttachmentMetadata& attachment_metadata); 63 const sync_pb::AttachmentMetadata& attachment_metadata);
64 64
65 // Update attachment metadata, replace all records matching attachment id's 65 // Update attachment metadata for |attachment_id| to indicate that this
66 // unique id with updated attachment id that contains server info. 66 // attachment has been uploaded to the sync server.
67 // Set is_in_server for corresponding records. 67 void MarkAttachmentAsOnServer(
68 void UpdateAttachmentIdWithServerInfo( 68 const sync_pb::AttachmentIdProto& attachment_id);
69 const sync_pb::AttachmentIdProto& updated_attachment_id);
70 69
71 private: 70 private:
72 // Kind of redundant. We should reduce the number of pointers 71 // Kind of redundant. We should reduce the number of pointers
73 // floating around if at all possible. Could we store this in Directory? 72 // floating around if at all possible. Could we store this in Directory?
74 // Scope: Set on construction, never changed after that. 73 // Scope: Set on construction, never changed after that.
75 WriteTransaction* const write_transaction_; 74 WriteTransaction* const write_transaction_;
76 75
77 DISALLOW_COPY_AND_ASSIGN(MutableEntry); 76 DISALLOW_COPY_AND_ASSIGN(MutableEntry);
78 }; 77 };
79 78
80 // This function sets only the flags needed to get this entry to sync. 79 // This function sets only the flags needed to get this entry to sync.
81 bool MarkForSyncing(syncable::MutableEntry* e); 80 bool MarkForSyncing(syncable::MutableEntry* e);
82 81
83 } // namespace syncable 82 } // namespace syncable
84 } // namespace syncer 83 } // namespace syncer
85 84
86 #endif // SYNC_SYNCABLE_MUTABLE_ENTRY_H_ 85 #endif // SYNC_SYNCABLE_MUTABLE_ENTRY_H_
OLDNEW
« no previous file with comments | « sync/syncable/directory_unittest.cc ('k') | sync/syncable/mutable_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698