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

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

Issue 9699057: [Sync] Move 'sync' target to sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Tim's comments Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2009 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 CHROME_BROWSER_SYNC_TEST_ENGINE_TEST_SYNCABLE_UTILS_H_
9 #define CHROME_BROWSER_SYNC_TEST_ENGINE_TEST_SYNCABLE_UTILS_H_
10 #pragma once
11
12 #include <string>
13
14 #include "chrome/browser/sync/syncable/syncable.h"
15
16 namespace syncable {
17
18 class BaseTransaction;
19 class Id;
20
21 // Count the number of entries with a given name inside of a parent.
22 // Useful to check folder structure and for porting older tests that
23 // rely on uniqueness inside of folders.
24 int CountEntriesWithName(BaseTransaction* rtrans,
25 const syncable::Id& parent_id,
26 const std::string& name);
27
28 // Get the first entry ID with name in a parent. The entry *must* exist.
29 Id GetFirstEntryWithName(BaseTransaction* rtrans,
30 const syncable::Id& parent_id,
31 const std::string& name);
32
33 // Assert that there's only one entry by this name in this parent.
34 // Return the Id.
35 Id GetOnlyEntryWithName(BaseTransaction* rtrans,
36 const syncable::Id& parent_id,
37 const std::string& name);
38
39 } // namespace syncable
40
41 #endif // CHROME_BROWSER_SYNC_TEST_ENGINE_TEST_SYNCABLE_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/engine/test_id_factory.h ('k') | chrome/browser/sync/test/engine/test_syncable_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698