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

Unified Diff: sync/sessions/nudge_tracker.cc

Issue 19982002: sync: Remove SyncSourceInfo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Convert SyncShareRecords to typedef 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/sessions/nudge_tracker.h ('k') | sync/sessions/nudge_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/sessions/nudge_tracker.cc
diff --git a/sync/sessions/nudge_tracker.cc b/sync/sessions/nudge_tracker.cc
index f9b90386f54e703fbb719270cce32383c37405ae..9587f394a45087a0d8f58ee887c3ea6b4c3870d3 100644
--- a/sync/sessions/nudge_tracker.cc
+++ b/sync/sessions/nudge_tracker.cc
@@ -6,7 +6,6 @@
#include "base/basictypes.h"
#include "sync/internal_api/public/base/invalidation.h"
-#include "sync/internal_api/public/sessions/sync_source_info.h"
#include "sync/protocol/sync.pb.h"
namespace syncer {
@@ -176,35 +175,6 @@ ModelTypeSet NudgeTracker::GetThrottledTypes() const {
return result;
}
-// This function is intended to mimic the behavior of older clients. Newer
-// clients and servers will not rely on SyncSourceInfo. See FillProtoMessage
-// for the more modern equivalent.
-SyncSourceInfo NudgeTracker::GetSourceInfo() const {
- ModelTypeInvalidationMap invalidation_map;
- for (TypeTrackerMap::const_iterator it = type_trackers_.begin();
- it != type_trackers_.end(); ++it) {
- if (it->second.IsThrottled()) {
- // We pretend throttled types are not enabled by skipping them.
- continue;
- } else if (it->second.HasPendingInvalidation()) {
- // The old-style source info can contain only one hint per type. We grab
- // the most recent, to mimic the old coalescing behaviour.
- Invalidation invalidation;
- invalidation.payload = it->second.GetMostRecentInvalidationPayload();
- invalidation_map.insert(std::make_pair(it->first, invalidation));
- } else if (it->second.HasLocalChangePending()) {
- // The old-style source info sent up an empty string (as opposed to
- // nothing at all) when the type was locally nudged, but had not received
- // any invalidations.
- Invalidation invalidation;
- invalidation.payload = "";
- invalidation_map.insert(std::make_pair(it->first, invalidation));
- }
- }
-
- return SyncSourceInfo(updates_source_, invalidation_map);
-}
-
void NudgeTracker::SetLegacyNotificationHint(
ModelType type,
sync_pb::DataTypeProgressMarker* progress) const {
« no previous file with comments | « sync/sessions/nudge_tracker.h ('k') | sync/sessions/nudge_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698