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

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

Issue 10699044: [Sync] Move sync/{internal_api,syncable} into syncer namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to head Created 8 years, 5 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
« no previous file with comments | « sync/test/engine/test_syncable_utils.h ('k') | sync/test/null_directory_change_delegate.h » ('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 to verify the state of items in unit tests. 5 // Utilities to verify the state of items in unit tests.
6 6
7 #include "sync/test/engine/test_syncable_utils.h" 7 #include "sync/test/engine/test_syncable_utils.h"
8 8
9 #include "sync/syncable/base_transaction.h" 9 #include "sync/syncable/base_transaction.h"
10 #include "sync/syncable/directory.h" 10 #include "sync/syncable/directory.h"
11 #include "sync/syncable/entry.h" 11 #include "sync/syncable/entry.h"
12 12
13 using std::string; 13 using std::string;
14 14
15 namespace syncer {
15 namespace syncable { 16 namespace syncable {
16 17
17 int CountEntriesWithName(BaseTransaction* rtrans, 18 int CountEntriesWithName(BaseTransaction* rtrans,
18 const syncable::Id& parent_id, 19 const syncable::Id& parent_id,
19 const string& name) { 20 const string& name) {
20 Directory::ChildHandles child_handles; 21 Directory::ChildHandles child_handles;
21 rtrans->directory()->GetChildHandlesById(rtrans, parent_id, &child_handles); 22 rtrans->directory()->GetChildHandlesById(rtrans, parent_id, &child_handles);
22 if (child_handles.size() <= 0) { 23 if (child_handles.size() <= 0) {
23 return 0; 24 return 0;
24 } 25 }
(...skipping 30 matching lines...) Expand all
55 } 56 }
56 57
57 Id GetOnlyEntryWithName(BaseTransaction* rtrans, 58 Id GetOnlyEntryWithName(BaseTransaction* rtrans,
58 const syncable::Id& parent_id, 59 const syncable::Id& parent_id,
59 const string& name) { 60 const string& name) {
60 CHECK(1 == CountEntriesWithName(rtrans, parent_id, name)); 61 CHECK(1 == CountEntriesWithName(rtrans, parent_id, name));
61 return GetFirstEntryWithName(rtrans, parent_id, name); 62 return GetFirstEntryWithName(rtrans, parent_id, name);
62 } 63 }
63 64
64 } // namespace syncable 65 } // namespace syncable
66 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/test/engine/test_syncable_utils.h ('k') | sync/test/null_directory_change_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698