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

Side by Side Diff: sync/sessions/nudge_tracker.h

Issue 13743003: sync: Finish the SyncScheduler refactor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix AuthErrorTest Created 7 years, 8 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
« no previous file with comments | « sync/engine/syncer_unittest.cc ('k') | sync/sessions/nudge_tracker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // A class to track the outstanding work required to bring the client back into
6 // sync with the server.
7 #ifndef SYNC_SESSIONS_NUDGE_TRACKER_H_
8 #define SYNC_SESSIONS_NUDGE_TRACKER_H_
9
10 #include <vector>
11
12 #include "base/compiler_specific.h"
13 #include "sync/base/sync_export.h"
14 #include "sync/internal_api/public/sessions/sync_source_info.h"
15
16 namespace syncer {
17 namespace sessions {
18
19 struct SyncSourceInfo;
20
21 class SYNC_EXPORT_PRIVATE NudgeTracker {
22 public:
23 NudgeTracker();
24 ~NudgeTracker();
25
26 // Merges in the information from another nudge.
27 void CoalesceSources(const SyncSourceInfo& source);
28
29 // Returns true if there are no unserviced nudges.
30 bool IsEmpty();
31
32 // Clear all unserviced nudges.
33 void Reset();
34
35 // Returns the coalesced source info.
36 const SyncSourceInfo& source_info() const {
37 return source_info_;
38 }
39
40 // Returns the set of locally modified types, according to our tracked source
41 // infos. The result is often wrong; see implementation comment for details.
42 ModelTypeSet GetLocallyModifiedTypes() const;
43
44 private:
45 // Merged source info for the nudge(s).
46 SyncSourceInfo source_info_;
47
48 DISALLOW_COPY_AND_ASSIGN(NudgeTracker);
49 };
50
51 } // namespace sessions
52 } // namespace syncer
53
54 #endif // SYNC_SESSIONS_NUDGE_TRACKER_H_
OLDNEW
« no previous file with comments | « sync/engine/syncer_unittest.cc ('k') | sync/sessions/nudge_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698