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

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

Issue 272043002: Invoke AttachmentUploader and update AttachmentIds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_DIRECTORY_H_ 5 #ifndef SYNC_SYNCABLE_DIRECTORY_H_
6 #define SYNC_SYNCABLE_DIRECTORY_H_ 6 #define SYNC_SYNCABLE_DIRECTORY_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 bool ResetVersionsForType(BaseWriteTransaction* trans, ModelType type); 390 bool ResetVersionsForType(BaseWriteTransaction* trans, ModelType type);
391 391
392 // Returns true iff the attachment identified by |attachment_id_proto| is 392 // Returns true iff the attachment identified by |attachment_id_proto| is
393 // linked to an entry. 393 // linked to an entry.
394 // 394 //
395 // An attachment linked to a deleted entry is still considered linked if the 395 // An attachment linked to a deleted entry is still considered linked if the
396 // entry hasn't yet been purged. 396 // entry hasn't yet been purged.
397 bool IsAttachmentLinked( 397 bool IsAttachmentLinked(
398 const sync_pb::AttachmentIdProto& attachment_id_proto) const; 398 const sync_pb::AttachmentIdProto& attachment_id_proto) const;
399 399
400 // Given attachment id return metahandles to all entries that reference this
401 // attachment.
402 void GetMetahandlesByAttachmentId(
maniscalco 2014/05/09 18:12:11 Can you please add some test cases to directory_un
pavely 2014/05/13 23:06:44 Done.
403 BaseTransaction* trans,
404 const sync_pb::AttachmentIdProto& attachment_id_proto,
405 Metahandles* result);
406
400 protected: // for friends, mainly used by Entry constructors 407 protected: // for friends, mainly used by Entry constructors
401 virtual EntryKernel* GetEntryByHandle(int64 handle); 408 virtual EntryKernel* GetEntryByHandle(int64 handle);
402 virtual EntryKernel* GetEntryByHandle(int64 metahandle, 409 virtual EntryKernel* GetEntryByHandle(int64 metahandle,
403 ScopedKernelLock* lock); 410 ScopedKernelLock* lock);
404 virtual EntryKernel* GetEntryById(const Id& id); 411 virtual EntryKernel* GetEntryById(const Id& id);
405 EntryKernel* GetEntryByServerTag(const std::string& tag); 412 EntryKernel* GetEntryByServerTag(const std::string& tag);
406 virtual EntryKernel* GetEntryByClientTag(const std::string& tag); 413 virtual EntryKernel* GetEntryByClientTag(const std::string& tag);
407 bool ReindexId(BaseWriteTransaction* trans, EntryKernel* const entry, 414 bool ReindexId(BaseWriteTransaction* trans, EntryKernel* const entry,
408 const Id& new_id); 415 const Id& new_id);
409 bool ReindexParentId(BaseWriteTransaction* trans, EntryKernel* const entry, 416 bool ReindexParentId(BaseWriteTransaction* trans, EntryKernel* const entry,
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 // are deleted in native models as well. 612 // are deleted in native models as well.
606 scoped_ptr<DeleteJournal> delete_journal_; 613 scoped_ptr<DeleteJournal> delete_journal_;
607 614
608 DISALLOW_COPY_AND_ASSIGN(Directory); 615 DISALLOW_COPY_AND_ASSIGN(Directory);
609 }; 616 };
610 617
611 } // namespace syncable 618 } // namespace syncable
612 } // namespace syncer 619 } // namespace syncer
613 620
614 #endif // SYNC_SYNCABLE_DIRECTORY_H_ 621 #endif // SYNC_SYNCABLE_DIRECTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698