| Index: sync/syncable/directory_unittest.h
|
| diff --git a/sync/syncable/directory_unittest.h b/sync/syncable/directory_unittest.h
|
| index 14e1a998eee96e700208555874e0a374bba73c7e..f1b2fe9d04a5376fbfb129fe0414fd05877e42c7 100644
|
| --- a/sync/syncable/directory_unittest.h
|
| +++ b/sync/syncable/directory_unittest.h
|
| @@ -9,6 +9,8 @@
|
|
|
| #include "base/basictypes.h"
|
| #include "base/message_loop/message_loop.h"
|
| +#include "sync/internal_api/public/base_node.h"
|
| +#include "sync/internal_api/public/user_share.h"
|
| #include "sync/syncable/in_memory_directory_backing_store.h"
|
| #include "sync/syncable/mutable_entry.h"
|
| #include "sync/syncable/syncable_read_transaction.h"
|
| @@ -54,6 +56,13 @@ class SyncableDirectoryTest : public testing::Test {
|
|
|
| void CreateEntry(const std::string& entryname, Id id);
|
|
|
| + // Create an entry with the given |model_type|, |client_tag| and
|
| + // |attachment_metadata|.
|
| + void CreateEntryWithAttachmentMetadata(
|
| + const ModelType& model_type,
|
| + const std::string& client_tag,
|
| + const sync_pb::AttachmentMetadata& attachment_metadata);
|
| +
|
| // When a directory is saved then loaded from disk, it will pass through
|
| // DropDeletedEntries(). This will remove some entries from the directory.
|
| // This function is intended to simulate that process.
|
| @@ -74,7 +83,19 @@ class SyncableDirectoryTest : public testing::Test {
|
| bool IsInDirtyMetahandles(int64 metahandle);
|
| bool IsInMetahandlesToPurge(int64 metahandle);
|
|
|
| + // Attempts to load the entry specified by |model_type| and |client_tag| and
|
| + // returns the lookup result code.
|
| + BaseNode::InitByLookupResult LookupEntryByClientTag(
|
| + const ModelType& model_type,
|
| + const std::string& client_tag);
|
| +
|
| + // Replace the entry specified by |model_type| and |client_tag| with a
|
| + // tombstone.
|
| + void ReplaceWithTombstone(const ModelType& model_type,
|
| + const std::string& client_tag);
|
| +
|
| scoped_ptr<Directory>& dir();
|
| + UserShare* user_share();
|
| DirectoryChangeDelegate* directory_change_delegate();
|
| Encryptor* encryptor();
|
| UnrecoverableErrorHandler* unrecoverable_error_handler();
|
| @@ -89,7 +110,7 @@ class SyncableDirectoryTest : public testing::Test {
|
| bool is_del);
|
|
|
| base::MessageLoop message_loop_;
|
| - scoped_ptr<Directory> dir_;
|
| + syncer::UserShare user_share_;
|
| NullDirectoryChangeDelegate delegate_;
|
| FakeEncryptor encryptor_;
|
| TestUnrecoverableErrorHandler handler_;
|
|
|