Home | History | Annotate | Download | only in syncable

Lines Matching refs:trans

76 void ExpectDataFromBookmarkFaviconEquals(BaseTransaction* trans,
152 WriteTransaction trans(&dir, UNITTEST, __FILE__, __LINE__);
153 MutableEntry e(&trans, GET_BY_HANDLE, written_metahandle);
155 PutDataAsBookmarkFavicon(&trans, &e, s, sizeof(s));
160 WriteTransaction trans(&dir, UNITTEST, __FILE__, __LINE__);
161 MutableEntry e(&trans, GET_BY_HANDLE, written_metahandle);
163 ExpectDataFromBookmarkFaviconEquals(&trans, &e, s, sizeof(s));
174 WriteTransaction trans(&dir, UNITTEST, __FILE__, __LINE__);
175 MutableEntry e(&trans, GET_BY_HANDLE, written_metahandle);
178 EXPECT_EQ(0, CountEntriesWithName(&trans, trans.root_id(), name));
212 ReadTransaction trans(&dir, __FILE__, __LINE__);
213 Entry me(&trans, GET_BY_CLIENT_TAG, tag);
250 ReadTransaction trans(&dir, __FILE__, __LINE__);
251 Entry me(&trans, GET_BY_CLIENT_TAG, tag);
363 ReadTransaction trans(dir_.get(), __FILE__, __LINE__);
365 dir_->GetAllMetaHandles(&trans, &all_set);
371 Entry e(&trans, GET_BY_HANDLE, *iter);
404 void ValidateEntry(BaseTransaction* trans,
418 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
420 MutableEntry e(&trans, CREATE, trans.root_id(), "foo");
460 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
462 MutableEntry e(&trans, CREATE, trans.root_id(), "foo");
483 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
489 MutableEntry e1(&trans, GET_BY_HANDLE, *i);
493 MutableEntry e2(&trans, CREATE, trans.root_id(), "bar");
534 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
535 MutableEntry item1(&trans, CREATE, trans.root_id(), "Item");
541 MutableEntry item2(&trans, CREATE_NEW_UPDATE_ITEM,
547 MutableEntry item3(&trans, CREATE, trans.root_id(), "Item");
553 MutableEntry item4(&trans, CREATE_NEW_UPDATE_ITEM,
559 MutableEntry item5(&trans, CREATE, trans.root_id(), "Item");
565 MutableEntry item6(&trans, CREATE_NEW_UPDATE_ITEM,
574 ReadTransaction trans(dir_.get(), __FILE__, __LINE__);
576 dir_->GetAllMetaHandles(&trans, &all_set);
596 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
598 MutableEntry e(&trans, CREATE, trans.root_id(), "foo");
606 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
612 MutableEntry e1(&trans, GET_BY_HANDLE, *i);
617 MutableEntry e2(&trans, CREATE, trans.root_id(), "bar");
627 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
631 MutableEntry e(&trans, GET_BY_HANDLE, *i);
646 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
652 MutableEntry e(&trans, GET_BY_HANDLE, *i);
699 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
700 MutableEntry e1(&trans, CREATE, trans.root_id(), name);
703 MutableEntry e2(&trans, CREATE, trans.root_id(), name);
706 MutableEntry e3(&trans, CREATE, trans.root_id(), name);
723 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
725 dir_->GetUnsyncedMetaHandles(&trans, &handles);
728 MutableEntry e1(&trans, CREATE, trans.root_id(), "abba");
735 MutableEntry e2(&trans, CREATE, e1.Get(ID), "bread");
743 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
745 dir_->GetUnsyncedMetaHandles(&trans, &handles);
748 MutableEntry e3(&trans, GET_BY_HANDLE, handle1);
754 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
755 dir_->GetUnsyncedMetaHandles(&trans, &handles);
759 MutableEntry e4(&trans, GET_BY_HANDLE, handle2);
765 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
766 dir_->GetUnsyncedMetaHandles(&trans, &handles);
775 MutableEntry e5(&trans, GET_BY_HANDLE, handle1);
783 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
784 dir_->GetUnsyncedMetaHandles(&trans, &handles);
794 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
796 dir_->GetUnappliedUpdateMetaHandles(&trans, &handles);
799 MutableEntry e1(&trans, CREATE, trans.root_id(), "abba");
807 MutableEntry e2(&trans, CREATE, e1.Get(ID), "bread");
816 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
818 dir_->GetUnappliedUpdateMetaHandles(&trans, &handles);
821 MutableEntry e3(&trans, GET_BY_HANDLE, handle1);
827 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
828 dir_->GetUnappliedUpdateMetaHandles(&trans, &handles);
832 MutableEntry e4(&trans, GET_BY_HANDLE, handle2);
838 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
839 dir_->GetUnappliedUpdateMetaHandles(&trans, &handles);
848 MutableEntry e5(&trans, GET_BY_HANDLE, handle1);
854 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
855 dir_->GetUnappliedUpdateMetaHandles(&trans, &handles);
900 return IsLegalNewParent(a.trans(), a.Get(ID), b.Get(ID));
964 WriteTransaction trans
965 MutableEntry folder(&trans, CREATE, trans.root_id(), "folder");
971 MutableEntry entry(&trans, CREATE, folder.Get(ID), entry_name);
980 ReadTransaction trans(dir_.get(), __FILE__, __LINE__);
981 EXPECT_EQ(0, CountEntriesWithName(&trans, trans.root_id(), entry_name));
982 EXPECT_EQ(1, CountEntriesWithName(&trans, folder_id, entry_name));
984 Entry entry(&trans, GET_BY_ID, entry_id);
1024 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
1025 MutableEntry folder(&trans, CREATE, trans.root_id(), folder_name);
1030 EXPECT_EQ(0, CountEntriesWithName(&trans, trans.root_id(), folder_name));
1032 MutableEntry deleted(&trans, GET_BY_ID, folder.Get(ID));
1034 ASSERT_TRUE(deleted.Put(PARENT_ID, trans.root_id()));
1037 EXPECT_EQ(0, CountEntriesWithName(&trans, trans.root_id(), folder_name));
1038 EXPECT_EQ(0, CountEntriesWithName(&trans, trans.root_id(), new_name));
1042 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
1043 MutableEntry folder(&trans, CREATE, trans.root_id(), "CaseChange");
1045 EXPECT_TRUE(folder.Put(PARENT_ID, trans.root_id()));
1055 ReadTransaction trans(dir_.get(), __FILE__, __LINE__);
1066 ReadTransaction trans(dir_.get(), __FILE__, __LINE__);
1077 ReadTransaction trans(dir_.get(), __FILE__, __LINE__);
1094 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
1095 MutableEntry create(&trans, CREATE, trans.root_id(), create_name);
1096 MutableEntry update(&trans, CREATE_NEW_UPDATE_ITEM, update_id);
1115 ReadTransaction trans(dir_.get(), __FILE__, __LINE__);
1116 Entry create(&trans, GET_BY_ID, create_id);
1117 EXPECT_EQ(1, CountEntriesWithName(&trans, trans.root_id(), create_name));
1118 Entry update(&trans, GET_BY_ID, update_id);
1169 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
1171 MutableEntry e1(&trans, CREATE, trans.root_id(), "aguilera");
1186 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
1188 MutableEntry aguilera(&trans, GET_BY_HANDLE, handle1);
1206 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
1208 MutableEntry aguilera(&trans, GET_BY_HANDLE, handle1);
1219 MutableEntry kids_on_block(&trans, CREATE, trans.root_id(), "kids");
1235 ReadTransaction trans(dir_.get(), __FILE__, __LINE__);
1236 Entry e1(&trans, GET_BY_HANDLE, handle1);
1239 Entry kids(&trans, GET_BY_HANDLE, handle2);
1252 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
1254 MutableEntry e1(&trans, CREATE, trans.root_id(), "aguilera");
1303 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
1305 MutableEntry folder(&trans, CREATE, trans.root_id(), "Folder");
1314 MutableEntry item(&trans, CREATE, trans.root_id(), "Item");
1325 MutableEntry deleted_item(&trans, CREATE, trans.root_id(), "Deleted Item");
1334 MutableEntry server_folder(&trans, CREATE_NEW_UPDATE_ITEM,
1343 MutableEntry server_item(&trans, CREATE_NEW_UPDATE_ITEM,
1370 void SyncableDirectoryTest::ValidateEntry(BaseTransaction* trans,
1377 Entry e(trans, GET_BY_ID, TestIdFactory::FromNumber(id));
1467 WriteTransaction trans(dir, UNITTEST, __FILE__, __LINE__);
1468 MutableEntry me(&trans, CREATE, trans.root_id(), "Jeff");
1477 ReadTransaction trans(dir, __FILE__, __LINE__);
1478 Entry e(&trans, GET_BY_HANDLE, step_->metahandle);
1541 WriteTransaction trans(dir, UNITTEST, __FILE__, __LINE__);
1542 MutableEntry me(&trans, CREATE, trans.root_id(), "Jeff");
1545 PutDataAsBookmarkFavicon(&trans, &me, test_bytes,
1572 ReadTransaction trans(dir, __FILE__, __LINE__);
1573 Entry e(&trans, GET_BY_ID, jeff_id);
1574 ExpectDataFromBookmarkFaviconEquals(&trans, &e, test_bytes,
1632 ReadTransaction trans(dir, __FILE__, __LINE__);
1633 CHECK(1 == CountEntriesWithName(&trans, trans.root_id(), path_name));
1639 WriteTransaction trans(dir, UNITTEST, __FILE__, __LINE__);
1640 MutableEntry e(&trans, CREATE, trans.root_id(), path_name);
1710 ReadTransaction trans(dir_.get(), __FILE__, __LINE__);
1711 Entry me(&trans, GET_BY_CLIENT_TAG, test_tag_);
1727 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__);
1728 MutableEntry me(&trans, GET_BY_CLIENT_TAG, test_tag_);
1733 ReadTransaction trans(dir_.get(), __FILE__, __LINE__);
1734 Entry by_tag(&trans, GET_BY_CLIENT_TAG, test_tag_);
1737 Entry by_id(&trans, GET_BY_ID, server_id);