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

Side by Side Diff: sync/internal_api/test/sync_manager_for_profile_sync_test.cc

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
OLDNEW
(Empty)
1 // Copyright 2013 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 #include "sync/internal_api/test/sync_manager_for_profile_sync_test.h"
6
7 #include "sync/internal_api/public/test/test_user_share.h"
8 #include "sync/internal_api/public/user_share.h"
9 #include "sync/syncable/directory.h"
10
11 namespace syncer {
12
13 SyncManagerForProfileSyncTest::SyncManagerForProfileSyncTest(
14 std::string name,
15 base::Closure init_callback)
16 : SyncManagerImpl(name),
17 init_callback_(init_callback) {}
18
19 SyncManagerForProfileSyncTest::~SyncManagerForProfileSyncTest() {}
20
21 void SyncManagerForProfileSyncTest::NotifyInitializationSuccess() {
22 UserShare* user_share = GetUserShare();
23 syncable::Directory* directory = user_share->directory.get();
24
25 if (!init_callback_.is_null())
26 init_callback_.Run();
27
28 ModelTypeSet early_download_types;
29 early_download_types.PutAll(ControlTypes());
30 early_download_types.PutAll(PriorityUserTypes());
31 for (ModelTypeSet::Iterator it = early_download_types.First();
32 it.Good(); it.Inc()) {
33 if (!directory->InitialSyncEndedForType(it.Get())) {
34 syncer::TestUserShare::CreateRoot(it.Get(), user_share);
35 }
36 }
37
38 SyncManagerImpl::NotifyInitializationSuccess();
39 }
40
41 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/test/sync_manager_for_profile_sync_test.h ('k') | sync/internal_api/test/test_entry_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698