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

Side by Side Diff: components/sync/core_impl/test/sync_manager_for_profile_sync_test.cc

Issue 2413313004: [Sync] Move the last things out of core/. (Closed)
Patch Set: Address comments. Created 4 years, 2 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 "components/sync/core_impl/test/sync_manager_for_profile_sync_test.h"
6
7 #include "components/sync/syncable/directory.h"
8 #include "components/sync/syncable/test_user_share.h"
9 #include "components/sync/syncable/user_share.h"
10
11 namespace syncer {
12
13 SyncManagerForProfileSyncTest::SyncManagerForProfileSyncTest(
14 std::string name,
15 base::Closure init_callback)
16 : SyncManagerImpl(name), init_callback_(init_callback) {}
17
18 SyncManagerForProfileSyncTest::~SyncManagerForProfileSyncTest() {}
19
20 void SyncManagerForProfileSyncTest::NotifyInitializationSuccess() {
21 UserShare* user_share = GetUserShare();
22 syncable::Directory* directory = user_share->directory.get();
23
24 if (!init_callback_.is_null())
25 init_callback_.Run();
26
27 ModelTypeSet early_download_types;
28 early_download_types.PutAll(ControlTypes());
29 early_download_types.PutAll(PriorityUserTypes());
30 for (ModelTypeSet::Iterator it = early_download_types.First(); it.Good();
31 it.Inc()) {
32 if (!directory->InitialSyncEndedForType(it.Get())) {
33 TestUserShare::CreateRoot(it.Get(), user_share);
34 }
35 }
36
37 SyncManagerImpl::NotifyInitializationSuccess();
38 }
39
40 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698