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

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

Issue 11474036: Remove initial_sync_ended bits (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another rebase Created 8 years 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
« no previous file with comments | « sync/syncable/syncable_unittest.cc ('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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 // Utilities that are useful in verifying the state of items in a 5 // Utilities that are useful in verifying the state of items in a
6 // syncable database. 6 // syncable database.
7 7
8 #ifndef SYNC_TEST_ENGINE_TEST_SYNCABLE_UTILS_H_ 8 #ifndef SYNC_TEST_ENGINE_TEST_SYNCABLE_UTILS_H_
9 #define SYNC_TEST_ENGINE_TEST_SYNCABLE_UTILS_H_ 9 #define SYNC_TEST_ENGINE_TEST_SYNCABLE_UTILS_H_
10 10
11 #include <string> 11 #include <string>
12 12
13 #include "sync/internal_api/public/base/model_type.h"
14
13 namespace syncer { 15 namespace syncer {
14 namespace syncable { 16 namespace syncable {
15 17
16 class BaseTransaction; 18 class BaseTransaction;
19 class Directory;
17 class Id; 20 class Id;
21 class WriteTransaction;
18 22
19 // Count the number of entries with a given name inside of a parent. 23 // Count the number of entries with a given name inside of a parent.
20 // Useful to check folder structure and for porting older tests that 24 // Useful to check folder structure and for porting older tests that
21 // rely on uniqueness inside of folders. 25 // rely on uniqueness inside of folders.
22 int CountEntriesWithName(BaseTransaction* rtrans, 26 int CountEntriesWithName(BaseTransaction* rtrans,
23 const syncable::Id& parent_id, 27 const syncable::Id& parent_id,
24 const std::string& name); 28 const std::string& name);
25 29
26 // Get the first entry ID with name in a parent. The entry *must* exist. 30 // Get the first entry ID with name in a parent. The entry *must* exist.
27 Id GetFirstEntryWithName(BaseTransaction* rtrans, 31 Id GetFirstEntryWithName(BaseTransaction* rtrans,
28 const syncable::Id& parent_id, 32 const syncable::Id& parent_id,
29 const std::string& name); 33 const std::string& name);
30 34
31 // Assert that there's only one entry by this name in this parent. 35 // Assert that there's only one entry by this name in this parent.
32 // Return the Id. 36 // Return the Id.
33 Id GetOnlyEntryWithName(BaseTransaction* rtrans, 37 Id GetOnlyEntryWithName(BaseTransaction* rtrans,
34 const syncable::Id& parent_id, 38 const syncable::Id& parent_id,
35 const std::string& name); 39 const std::string& name);
36 40
41 void CreateTypeRoot(WriteTransaction* trans,
42 syncable::Directory *dir,
43 ModelType type);
44
37 } // namespace syncable 45 } // namespace syncable
38 } // namespace syncer 46 } // namespace syncer
39 47
40 #endif // SYNC_TEST_ENGINE_TEST_SYNCABLE_UTILS_H_ 48 #endif // SYNC_TEST_ENGINE_TEST_SYNCABLE_UTILS_H_
OLDNEW
« no previous file with comments | « sync/syncable/syncable_unittest.cc ('k') | sync/test/engine/test_syncable_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698