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

Side by Side Diff: sync/test/engine/test_syncable_utils.h

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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
« no previous file with comments | « sync/test/engine/test_id_factory.h ('k') | sync/test/engine/test_syncable_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 //
5 // Utilities that are useful in verifying the state of items in a
6 // syncable database.
7
8 #ifndef SYNC_TEST_ENGINE_TEST_SYNCABLE_UTILS_H_
9 #define SYNC_TEST_ENGINE_TEST_SYNCABLE_UTILS_H_
10
11 #include <string>
12
13 #include "sync/internal_api/public/base/model_type.h"
14 #include "sync/protocol/sync.pb.h"
15
16 namespace syncer {
17 namespace syncable {
18
19 class BaseTransaction;
20 class Directory;
21 class Id;
22 class WriteTransaction;
23
24 // Count the number of entries with a given name inside of a parent.
25 // Useful to check folder structure and for porting older tests that
26 // rely on uniqueness inside of folders.
27 int CountEntriesWithName(BaseTransaction* rtrans,
28 const syncable::Id& parent_id,
29 const std::string& name);
30
31 // Get the first entry ID with name in a parent. The entry *must* exist.
32 Id GetFirstEntryWithName(BaseTransaction* rtrans,
33 const syncable::Id& parent_id,
34 const std::string& name);
35
36 // Assert that there's only one entry by this name in this parent.
37 // Return the Id.
38 Id GetOnlyEntryWithName(BaseTransaction* rtrans,
39 const syncable::Id& parent_id,
40 const std::string& name);
41
42 void CreateTypeRoot(WriteTransaction* trans,
43 syncable::Directory *dir,
44 ModelType type);
45
46 sync_pb::DataTypeProgressMarker BuildProgress(ModelType type);
47
48 } // namespace syncable
49 } // namespace syncer
50
51 #endif // SYNC_TEST_ENGINE_TEST_SYNCABLE_UTILS_H_
OLDNEW
« no previous file with comments | « sync/test/engine/test_id_factory.h ('k') | sync/test/engine/test_syncable_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698