Make sure webview uses embedder display DPI.
[chromium-blink-merge.git] / sync / sessions / nudge_tracker.h
blob0128ce096efa4075383b579b502f44eafcd75297
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_
10 #include <vector>
12 #include "base/compiler_specific.h"
13 #include "sync/base/sync_export.h"
14 #include "sync/internal_api/public/sessions/sync_source_info.h"
16 namespace syncer {
17 namespace sessions {
19 struct SyncSourceInfo;
21 class SYNC_EXPORT_PRIVATE NudgeTracker {
22 public:
23 NudgeTracker();
24 ~NudgeTracker();
26 // Merges in the information from another nudge.
27 void CoalesceSources(const SyncSourceInfo& source);
29 // Returns true if there are no unserviced nudges.
30 bool IsEmpty();
32 // Clear all unserviced nudges.
33 void Reset();
35 // Returns the coalesced source info.
36 const SyncSourceInfo& source_info() const {
37 return source_info_;
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;
44 private:
45 // Merged source info for the nudge(s).
46 SyncSourceInfo source_info_;
48 DISALLOW_COPY_AND_ASSIGN(NudgeTracker);
51 } // namespace sessions
52 } // namespace syncer
54 #endif // SYNC_SESSIONS_NUDGE_TRACKER_H_