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

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

Issue 15764010: Experimental functionize patch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync: Expose sync functionality as functions Created 7 years, 6 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
« no previous file with comments | « sync/engine/syncer_util.h ('k') | sync/sessions/data_type_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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 // A class to track the per-type scheduling data. 5 // A class to track the per-type scheduling data.
6 #ifndef SYNC_SESSIONS_DATA_TYPE_TRACKER_H_ 6 #ifndef SYNC_SESSIONS_DATA_TYPE_TRACKER_H_
7 #define SYNC_SESSIONS_DATA_TYPE_TRACKER_H_ 7 #define SYNC_SESSIONS_DATA_TYPE_TRACKER_H_
8 8
9 #include <deque> 9 #include <deque>
10 #include <string> 10 #include <string>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // Returns true if there is an uncommitted local change. 52 // Returns true if there is an uncommitted local change.
53 bool HasLocalChangePending() const; 53 bool HasLocalChangePending() const;
54 54
55 // Returns true if we've received an invalidation since we last fetched 55 // Returns true if we've received an invalidation since we last fetched
56 // updates. 56 // updates.
57 bool HasPendingInvalidation() const; 57 bool HasPendingInvalidation() const;
58 58
59 // Returns the most recent invalidation payload. 59 // Returns the most recent invalidation payload.
60 std::string GetMostRecentInvalidationPayload() const; 60 std::string GetMostRecentInvalidationPayload() const;
61 61
62 // Fills in the legacy invalidaiton payload information fields.
63 void SetLegacyNotificationHint(
64 sync_pb::DataTypeProgressMarker* progress) const;
65
62 // Fills some type-specific contents of a GetUpdates request protobuf. These 66 // Fills some type-specific contents of a GetUpdates request protobuf. These
63 // messages provide the server with the information it needs to decide how to 67 // messages provide the server with the information it needs to decide how to
64 // handle a request. 68 // handle a request.
65 void FillGetUpdatesTriggersMessage(sync_pb::GetUpdateTriggers* msg) const; 69 void FillGetUpdatesTriggersMessage(sync_pb::GetUpdateTriggers* msg) const;
66 70
67 // Returns true if the type is currently throttled. 71 // Returns true if the type is currently throttled.
68 bool IsThrottled() const; 72 bool IsThrottled() const;
69 73
70 // Returns the time until this type's throttling interval expires. Should not 74 // Returns the time until this type's throttling interval expires. Should not
71 // be called unless IsThrottled() returns true. The returned value will be 75 // be called unless IsThrottled() returns true. The returned value will be
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 108
105 // If !unthrottle_time_.is_null(), this type is throttled and may not download 109 // If !unthrottle_time_.is_null(), this type is throttled and may not download
106 // or commit data until the specified time. 110 // or commit data until the specified time.
107 base::TimeTicks unthrottle_time_; 111 base::TimeTicks unthrottle_time_;
108 }; 112 };
109 113
110 } // namespace syncer 114 } // namespace syncer
111 } // namespace sessions 115 } // namespace sessions
112 116
113 #endif // SYNC_SESSIONS_DATA_TYPE_TRACKER_H_ 117 #endif // SYNC_SESSIONS_DATA_TYPE_TRACKER_H_
OLDNEW
« no previous file with comments | « sync/engine/syncer_util.h ('k') | sync/sessions/data_type_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698