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

Unified Diff: sync/internal_api/write_transaction.cc

Issue 272043002: Invoke AttachmentUploader and update AttachmentIds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android build 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/internal_api/public/write_transaction.h ('k') | sync/syncable/directory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/write_transaction.cc
diff --git a/sync/internal_api/write_transaction.cc b/sync/internal_api/write_transaction.cc
index b2dfe87da1785038367047bd1f0bb05b0f7d5eef..70e902954dc1f54ad87646c36bb0fddf513e4275 100644
--- a/sync/internal_api/write_transaction.cc
+++ b/sync/internal_api/write_transaction.cc
@@ -5,6 +5,7 @@
#include "sync/internal_api/public/write_transaction.h"
#include "sync/syncable/directory.h"
+#include "sync/syncable/mutable_entry.h"
#include "sync/syncable/syncable_write_transaction.h"
namespace syncer {
@@ -80,4 +81,17 @@ void WriteTransaction::SetDataTypeContext(
// See crbug.com/360280
}
+void WriteTransaction::UpdateEntriesWithAttachmentId(
+ const AttachmentId& attachment_id) {
+ syncable::Directory::Metahandles handles;
+ GetDirectory()->GetMetahandlesByAttachmentId(
+ transaction_, attachment_id.GetProto(), &handles);
+ for (syncable::Directory::Metahandles::iterator iter = handles.begin();
+ iter != handles.end();
+ ++iter) {
+ syncable::MutableEntry entry(transaction_, syncable::GET_BY_HANDLE, *iter);
+ entry.UpdateAttachmentIdWithServerInfo(attachment_id.GetProto());
+ }
+}
+
} // namespace syncer
« no previous file with comments | « sync/internal_api/public/write_transaction.h ('k') | sync/syncable/directory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698