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

Side by Side Diff: sync/engine/syncer.h

Issue 19982002: sync: Remove SyncSourceInfo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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
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 #ifndef SYNC_ENGINE_SYNCER_H_ 5 #ifndef SYNC_ENGINE_SYNCER_H_
6 #define SYNC_ENGINE_SYNCER_H_ 6 #define SYNC_ENGINE_SYNCER_H_
7 7
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 28 matching lines...) Expand all
39 virtual ~Syncer(); 39 virtual ~Syncer();
40 40
41 // Called by other threads to tell the syncer to stop what it's doing 41 // Called by other threads to tell the syncer to stop what it's doing
42 // and return early from SyncShare, if possible. 42 // and return early from SyncShare, if possible.
43 bool ExitRequested(); 43 bool ExitRequested();
44 void RequestEarlyExit(); 44 void RequestEarlyExit();
45 45
46 virtual bool NormalSyncShare(ModelTypeSet request_types, 46 virtual bool NormalSyncShare(ModelTypeSet request_types,
47 const sessions::NudgeTracker& nudge_tracker, 47 const sessions::NudgeTracker& nudge_tracker,
48 sessions::SyncSession* session); 48 sessions::SyncSession* session);
49 virtual bool ConfigureSyncShare(ModelTypeSet request_types, 49 virtual bool ConfigureSyncShare(
50 sessions::SyncSession* session); 50 ModelTypeSet request_types,
51 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source,
tim (not reviewing) 2013/08/01 17:16:38 Can you comment the different *SyncShare functions
rlarocque 2013/08/01 21:01:41 Done.
52 sessions::SyncSession* session);
51 virtual bool PollSyncShare(ModelTypeSet request_types, 53 virtual bool PollSyncShare(ModelTypeSet request_types,
52 sessions::SyncSession* session); 54 sessions::SyncSession* session);
53 55
54 private: 56 private:
55 void ApplyUpdates(sessions::SyncSession* session); 57 void ApplyUpdates(sessions::SyncSession* session);
56 bool DownloadAndApplyUpdates( 58 bool DownloadAndApplyUpdates(
57 sessions::SyncSession* session, 59 sessions::SyncSession* session,
58 base::Callback<SyncerError(void)> download_fn); 60 base::Callback<SyncerError(void)> download_fn);
59 61
60 void HandleCycleBegin(sessions::SyncSession* session); 62 void HandleCycleBegin(sessions::SyncSession* session);
61 bool HandleCycleEnd(sessions::SyncSession* session); 63 bool HandleCycleEnd(
64 sessions::SyncSession* session,
65 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source);
62 66
63 bool early_exit_requested_; 67 bool early_exit_requested_;
64 base::Lock early_exit_requested_lock_; 68 base::Lock early_exit_requested_lock_;
65 69
66 friend class SyncerTest; 70 friend class SyncerTest;
67 FRIEND_TEST_ALL_PREFIXES(SyncerTest, NameClashWithResolver); 71 FRIEND_TEST_ALL_PREFIXES(SyncerTest, NameClashWithResolver);
68 FRIEND_TEST_ALL_PREFIXES(SyncerTest, IllegalAndLegalUpdates); 72 FRIEND_TEST_ALL_PREFIXES(SyncerTest, IllegalAndLegalUpdates);
69 FRIEND_TEST_ALL_PREFIXES(SyncerTest, TestCommitListOrderingAndNewParent); 73 FRIEND_TEST_ALL_PREFIXES(SyncerTest, TestCommitListOrderingAndNewParent);
70 FRIEND_TEST_ALL_PREFIXES(SyncerTest, 74 FRIEND_TEST_ALL_PREFIXES(SyncerTest,
71 TestCommitListOrderingAndNewParentAndChild); 75 TestCommitListOrderingAndNewParentAndChild);
(...skipping 12 matching lines...) Expand all
84 FRIEND_TEST_ALL_PREFIXES(SyncerTest, DeletingEntryWithLocalEdits); 88 FRIEND_TEST_ALL_PREFIXES(SyncerTest, DeletingEntryWithLocalEdits);
85 FRIEND_TEST_ALL_PREFIXES(EntryCreatedInNewFolderTest, 89 FRIEND_TEST_ALL_PREFIXES(EntryCreatedInNewFolderTest,
86 EntryCreatedInNewFolderMidSync); 90 EntryCreatedInNewFolderMidSync);
87 91
88 DISALLOW_COPY_AND_ASSIGN(Syncer); 92 DISALLOW_COPY_AND_ASSIGN(Syncer);
89 }; 93 };
90 94
91 } // namespace syncer 95 } // namespace syncer
92 96
93 #endif // SYNC_ENGINE_SYNCER_H_ 97 #endif // SYNC_ENGINE_SYNCER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698