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

Unified Diff: sync/syncable/directory.h

Issue 582913002: Make GenericChangeProcessor upload attachments on startup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with master. Created 6 years, 3 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/syncable/DEPS ('k') | sync/syncable/directory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/directory.h
diff --git a/sync/syncable/directory.h b/sync/syncable/directory.h
index 1d86a1f3226c9d33cdc3d27a1173c7bf6d51d46a..170d7b66322376fa78145812cc99f127e8003ac5 100644
--- a/sync/syncable/directory.h
+++ b/sync/syncable/directory.h
@@ -15,6 +15,7 @@
#include "base/files/file_util.h"
#include "base/gtest_prod_util.h"
#include "base/values.h"
+#include "sync/api/attachments/attachment_id.h"
#include "sync/base/sync_export.h"
#include "sync/internal_api/public/util/report_unrecoverable_error_function.h"
#include "sync/internal_api/public/util/weak_handle.h"
@@ -413,6 +414,12 @@ class SYNC_EXPORT Directory {
// preserve sync preferences in DB on disk.
void UnmarkDirtyEntry(WriteTransaction* trans, Entry* entry);
+ // Clears |id_set| and fills it with the ids of attachments that need to be
+ // uploaded to the sync server.
+ void GetAttachmentIdsToUpload(BaseTransaction* trans,
+ ModelType type,
+ AttachmentIdSet* id_set);
+
protected: // for friends, mainly used by Entry constructors
virtual EntryKernel* GetEntryByHandle(int64 handle);
virtual EntryKernel* GetEntryByHandle(int64 metahandle,
@@ -603,6 +610,13 @@ class SYNC_EXPORT Directory {
const sync_pb::AttachmentMetadata& attachment_metadata,
const ScopedKernelLock& lock);
+ // A private version of the public GetMetaHandlesOfType for when you already
+ // have a ScopedKernelLock.
+ void GetMetaHandlesOfType(const ScopedKernelLock& lock,
+ BaseTransaction* trans,
+ ModelType type,
+ std::vector<int64>* result);
+
Kernel* kernel_;
scoped_ptr<DirectoryBackingStore> store_;
« no previous file with comments | « sync/syncable/DEPS ('k') | sync/syncable/directory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698