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

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

Issue 13743003: sync: Finish the SyncScheduler refactor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ModelNeutralState forward decl 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 | « no previous file | sync/engine/nudge_tracker.cc » ('j') | sync/engine/nudge_tracker.cc » ('J')
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 #ifndef SYNC_ENGINE_NUDGE_TRACKER_H_
6 #define SYNC_ENGINE_NUDGE_TRACKER_H_
tim (not reviewing) 2013/04/15 22:37:49 nit - A file (or class) comment would be nice.
7
8 #include <vector>
9
10 #include "sync/base/sync_export.h"
11 #include "sync/internal_api/public/sessions/sync_source_info.h"
12
13 namespace syncer {
14
15 namespace sessions {
16 struct SyncSourceInfo;
17 } // namespace sessions
tim (not reviewing) 2013/04/15 22:37:49 nit - the comment isn't necessary when the whole n
rlarocque 2013/04/16 01:30:26 Maybe? I never understood why sessions had to be
tim (not reviewing) 2013/04/16 20:16:24 I think so. Sessions can interact with whatever it
rlarocque 2013/04/16 22:20:05 Done.
18
19 class SYNC_EXPORT_PRIVATE NudgeTracker {
20 public:
21 NudgeTracker();
22 ~NudgeTracker();
23
24 // Merges in the information from another nudge.
25 void CoalesceSources(const sessions::SyncSourceInfo& source);
26
27 // Returns true if there are no unserviced nudges.
28 bool IsEmpty();
29
30 // Clear all unserviced nudges.
31 void Reset();
32
33 // Returns the coalesced source info.
34 const sessions::SyncSourceInfo& source_info() const {
35 return source_info_;
36 }
37
38 // Returns the set of locally modified types, according to our tracked source
39 // infos. The result is often wrong; see implementation comment for details.
40 ModelTypeSet GetLocallyModifiedTypes() const;
41
42 private:
43 // Merged source info for the nudge(s).
44 sessions::SyncSourceInfo source_info_;
45 };
tim (not reviewing) 2013/04/15 22:37:49 DISALLOW_COPY_AND_ASSIGN
rlarocque 2013/04/16 01:30:26 Done.
46
47 } // namespace syncer
48
49 #endif // SYNC_ENGINE_NUDGE_TRACKER_H_
OLDNEW
« no previous file with comments | « no previous file | sync/engine/nudge_tracker.cc » ('j') | sync/engine/nudge_tracker.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698